From 0cb3e5d98dd3947983ca75d8a6ee9b1e0b9e08f4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 14 Mar 2022 11:45:26 +0000 Subject: [PATCH] Convert marker popups to tooltips on hover --- .../components/app/embedded-map/EmbeddedMap.svelte | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/client/src/components/app/embedded-map/EmbeddedMap.svelte b/packages/client/src/components/app/embedded-map/EmbeddedMap.svelte index 200aaaaed9..342927252a 100644 --- a/packages/client/src/components/app/embedded-map/EmbeddedMap.svelte +++ b/packages/client/src/components/app/embedded-map/EmbeddedMap.svelte @@ -216,13 +216,10 @@ row[titleKey] ) - marker.bindPopup(markerContent).addTo(mapMarkerGroup) - - //https://github.com/Leaflet/Leaflet/issues/7331 - marker.on("click", function () { - this.openPopup() - }) - + marker.bindTooltip(markerContent, { + direction: "top", + offset: [0, -25] + }).addTo(mapMarkerGroup) mapMarkers = [...mapMarkers, marker] }) }