@classic-homes/maps-svelte 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -109,7 +109,10 @@
|
|
|
109
109
|
if (!map || !popup) return;
|
|
110
110
|
|
|
111
111
|
if (open) {
|
|
112
|
-
popup.setLngLat(coordinates as [number, number])
|
|
112
|
+
popup.setLngLat(coordinates as [number, number]);
|
|
113
|
+
// addTo() removes an existing attachment and emits close. Coordinate or
|
|
114
|
+
// callback updates must move the current popup without clearing selection.
|
|
115
|
+
if (!popup.isOpen()) popup.addTo(map);
|
|
113
116
|
|
|
114
117
|
// Auto-pan to fit popup after it renders
|
|
115
118
|
if (autoPan) {
|