From 5a2e0a53ed5e79f910573a47cd4cf7e6a52a27ae Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Tue, 26 May 2020 15:44:41 +1000 Subject: [PATCH] Fix map scroll with modals open --- src/components/map/MapInteraction.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/map/MapInteraction.js b/src/components/map/MapInteraction.js index 0348c16..3362f53 100644 --- a/src/components/map/MapInteraction.js +++ b/src/components/map/MapInteraction.js @@ -78,6 +78,9 @@ function MapInteraction({ map, children, controls, selectedToolId }) { const bind = useGesture({ onWheel: ({ delta }) => { + if (preventMapInteraction) { + return; + } const newScale = Math.min( Math.max(stageScale + delta[1] * wheelZoomSpeed, minZoom), maxZoom