aboutsummaryrefslogtreecommitdiffstats
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'main.js')
-rw-r--r--main.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.js b/main.js
index 051ef5f..62eccdb 100644
--- a/main.js
+++ b/main.js
@@ -336,6 +336,12 @@ if (window.location !== window.parent.location) {
map.addControl(control);
control.addEventListener('enterfullscreen', function() {
+ const popover = Popover.getInstance(popup);
+ if (popover !== null) {
+ /* dispose popover as entering fullscreen messes up its position */
+ popover.dispose();
+ }
+
const btn = control.element.getElementsByTagName('button')[0];
btn.classList.replace(classInactive, classActive);
btn.title = titleActive;
@@ -919,7 +925,7 @@ map.addLayer(new VectorTileLayer({
header.appendChild(btnNext);
header.appendChild(btnClose);
- const container0 = map.getViewport().querySelector('.ol-overlay-container.ol-selectable');
+ const container0 = map.getViewport().getElementsByClassName('ol-overlaycontainer-stopevent')[0];
map.on('singleclick', function(event) {
/* clear the features list */
features.length = 0;