Skip to content

Commit

Permalink
DBC22-2048: move tolerance and hover reset for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrel-oxd committed Apr 30, 2024
1 parent 41596bb commit b4b42d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/frontend/src/Components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ export default function MapWrapper({ camera, isPreview, mapViewRoute }) {
overlays: [popup.current],
view: mapView.current,
pixelRatio: 1.875,
moveTolerance: 7,
controls: [new ScaleLine({ units: 'metric' })],
});
window.mapRef = mapRef;
Expand All @@ -325,6 +326,9 @@ export default function MapWrapper({ camera, isPreview, mapViewRoute }) {
});

mapRef.current.on('moveend', function () {
if(smallScreen){
resetHoveredStates();
}
dispatch(
updateMapState({
pan: toLonLat(mapView.current.getCenter()),
Expand Down

0 comments on commit b4b42d9

Please sign in to comment.