diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-05-26 23:24:49 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-05-27 00:44:58 +0200 |
commit | 7d94e145c401503d54d4723fc03ef7872423b776 (patch) | |
tree | 12685760be138941d884d27b6bafafa8b33ad989 | |
parent | 670f948f5786aa1fb460dd89e1f934d442a4a81f (diff) |
Dispose popover when (un)selecting layers.
-rw-r--r-- | main.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3335,6 +3335,12 @@ const [vectorLayers, featureOverlayLayer] = (function() { }); }; const onClickFunction = function(layerList, event) { + featureOverlayLayer.setVisible(false); + featureOverlayLayer.changed(); + const popover = Popover.getInstance(popup); + if (popover !== null) { + popover.dispose(); + } const searchParams = new URLSearchParams(location.hash.substring(1)); let layersParams = searchParams.get('layers') || ''; layersParams = layersParams.match(/^\s*$/) ? [] : layersParams.split(' '); |