diff options
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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; |