From ba0a67ad2bc9e8088c308d412692faa6bf0cbf82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 12 Sep 2017 20:50:48 +0200 Subject: [PATCH] CategoryOverpass: after onUpdate re-render details page (if shown) --- src/CategoryOverpass.js | 4 ++++ src/index.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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')