Merge pull request #1374 from Freika/fix/route-popup

Fixed a bug where hovering over a route when another route is clicked…
This commit is contained in:
Evgenii Burmakin 2025-06-09 12:09:16 +02:00 committed by GitHub
commit d8516fc4e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -235,7 +235,7 @@ export function addHighlightOnHover(polylineGroup, map, polylineCoordinates, use
hoverPopup = L.popup()
.setLatLng(e.latlng)
.setContent(popupContent)
.openOn(map);
.addTo(map);
}
}
@ -329,7 +329,7 @@ export function addHighlightOnHover(polylineGroup, map, polylineCoordinates, use
hoverPopup = L.popup()
.setLatLng(e.latlng)
.setContent(popupContent)
.openOn(map);
.addTo(map);
// Prevent the click event from propagating to the map
L.DomEvent.stopPropagation(e);