Popup Close

This commit is contained in:
ingalls
2025-12-15 21:40:24 -07:00
parent 05b50b491d
commit 3ee922ed06
2 changed files with 13 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
<div
ref='radial-menu'
class='position-absolute'
style='pointer-events: none;'
style='pointer-events: none; z-index: 1000;'
:style='{
top: `${mapStore.radial.y - (size / 2)}px`,
left: `${mapStore.radial.x - (size / 2)}px`,

View File

@@ -49,6 +49,13 @@ onMounted(() => {
.setLngLat(lngLat)
.setDOMContent(selectMenu.value)
.addTo(mapStore.map);
popup.on('close', () => {
if (mapStore.select.feats) {
mapStore.select.feats = [];
popup.remove();
}
});
});
watch(() => [mapStore.select.x, mapStore.select.y], ([x, y]) => {
@@ -66,9 +73,14 @@ onUnmounted(() => {
</script>
<style>
.multiple-select-popup {
pointer-events: none;
}
.multiple-select-popup .maplibregl-popup-content {
background: transparent;
padding: 0;
pointer-events: auto;
}
.multiple-select-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {