@smartnet360/svelte-components 0.0.70 → 0.0.71
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.
|
@@ -246,16 +246,17 @@
|
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
+
// Add event listeners (remove first to avoid duplicates)
|
|
250
|
+
map.off('zoom', updateLabels);
|
|
251
|
+
map.off('moveend', handleViewportChange);
|
|
252
|
+
map.off('zoomend', handleViewportChange);
|
|
253
|
+
|
|
254
|
+
map.on('zoom', updateLabels);
|
|
255
|
+
map.on('moveend', handleViewportChange);
|
|
256
|
+
map.on('zoomend', handleViewportChange);
|
|
257
|
+
|
|
249
258
|
// Initial render
|
|
250
259
|
updateLabels();
|
|
251
|
-
|
|
252
|
-
// Add event listeners (only once)
|
|
253
|
-
// Note: These will persist across style changes, but the layer needs reinit
|
|
254
|
-
if (!map.listens('zoom')) {
|
|
255
|
-
map.on('zoom', updateLabels);
|
|
256
|
-
map.on('moveend', handleViewportChange);
|
|
257
|
-
map.on('zoomend', handleViewportChange);
|
|
258
|
-
}
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
onMount(async () => {
|