diff --git a/src/CategoryOverpass.js b/src/CategoryOverpass.js index 1c1ffa39..587acaa2 100644 --- a/src/CategoryOverpass.js +++ b/src/CategoryOverpass.js @@ -94,6 +94,10 @@ function CategoryOverpass (id, data) { } this.updatePopupContent(ob, ob.popup) + + if (document.getElementById('content').className === 'details') { + showDetails(ob, this) + } }.bind(this) p = document.createElement('div') diff --git a/src/index.js b/src/index.js index 229902b1..5963a2d5 100644 --- a/src/index.js +++ b/src/index.js @@ -205,7 +205,7 @@ function show (id, options, callback) { }) } -function showDetails (data, category) { +window.showDetails = function (data, category) { var div, h, dt, dd var k var dom = document.getElementById('contentDetails')