ToastFreeware
/
philipp
/
winterrodeln
/
mediawiki_extensions
/
wrmap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdd61a9
)
Only show popups if they are not empty.
author
Philipp Spitzer
<philipp@spitzer.priv.at>
Sat, 2 Jan 2021 16:34:28 +0000
(17:34 +0100)
committer
Philipp Spitzer
<philipp@spitzer.priv.at>
Sat, 2 Jan 2021 16:34:28 +0000
(17:34 +0100)
wrmap.js
patch
|
blob
|
history
diff --git
a/wrmap.js
b/wrmap.js
index 40c5773a18b9167fc923fdfaa4948ee0140db1f0..af6f13656a903617fb33bbcc9169ceeb140a6331 100644
(file)
--- a/
wrmap.js
+++ b/
wrmap.js
@@
-376,8
+376,10
@@
function init_wrmap(i, jq_map) {
let feature = event.selected[0];
let coordinates = feature.getGeometry().getCoordinates();
let popup_dom = create_popup_dom(feature);
- $(popup_content).empty().append(popup_dom);
- popup_overlay.setPosition(coordinates);
+ if (popup_dom.children().length > 0) {
+ $(popup_content).empty().append(popup_dom);
+ popup_overlay.setPosition(coordinates);
+ }
}
});
}