Skip to content

Commit

Permalink
Don't show add popup when click on map
Browse files Browse the repository at this point in the history
Fixes #68
  • Loading branch information
nielsbom committed Jul 5, 2024
1 parent 74c9508 commit c183779
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/Map.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
});
addPinLayer(map, activeMarkerLayerId, activeMarkerSourceId, 'add-marker');
map.on('click', markerLayerId, function (e) {
map.on('click', markerLayerId, function (e: MapMouseEvent) {
isMomentLayerClicked = true;
if (!e.features || e.features.length === 0) {
return;
Expand Down Expand Up @@ -204,15 +204,14 @@
}
});
map.on('click', (e) => {
map.on('click', (e: MapMouseEvent) => {
if (isMomentLayerClicked) {
isMomentLayerClicked = false;
return;
}
const { lng, lat } = e.lngLat;
activeMarkerCoords.set({ lng, lat });
addOverlayVisible.set(true);
});
});
});
Expand Down

0 comments on commit c183779

Please sign in to comment.