2 parents cbd3034 + b06db09 commit f42f12aCopy full SHA for f42f12a
1 file changed
static/js/map.js
@@ -524,6 +524,7 @@ function bindHoverAndLock(marker) {
524
}
525
const el = marker.getPopup()?.getElement();
526
if (el) el.classList.add("popup-locked");
527
+ map.panTo(marker.getLatLng());
528
});
529
530
// --- keep popup alive while cursor is inside it ---
@@ -563,14 +564,6 @@ function addMarker(loc) {
563
564
marker.addTo(markerLayer);
565
566
-// Center map on marker when its popup opens
567
-map.on('popupopen', (e) => {
568
- const latlng = e.popup.getLatLng();
569
- if (latlng) {
570
- map.panTo(latlng);
571
- }
572
-});
573
-
574
// Re-cluster on zoom
575
map.on('zoomend', () => {
576
if (allLocations.length > CLUSTER_THRESHOLD) {
0 commit comments