make wheel listener non-passive explicitly

This commit is contained in:
Artyom Sovetnikov
2023-03-18 19:14:16 +03:00
parent 29790476d8
commit 9fab9b82b4
@@ -140,7 +140,7 @@ const ZoomPane = ({
-(deltaX / currentZoom) * panOnScrollSpeed, -(deltaX / currentZoom) * panOnScrollSpeed,
-(deltaY / currentZoom) * panOnScrollSpeed -(deltaY / currentZoom) * panOnScrollSpeed
); );
}); }, { passive: false });
} else if (typeof d3ZoomHandler !== 'undefined') { } else if (typeof d3ZoomHandler !== 'undefined') {
d3Selection.on('wheel.zoom', function (event: any, d: any) { d3Selection.on('wheel.zoom', function (event: any, d: any) {
if (!preventScrolling || isWrappedWithClass(event, noWheelClassName)) { if (!preventScrolling || isWrappedWithClass(event, noWheelClassName)) {
@@ -149,7 +149,7 @@ const ZoomPane = ({
event.preventDefault(); event.preventDefault();
d3ZoomHandler.call(this, event, d); d3ZoomHandler.call(this, event, d);
}); }, { passive: false });
} }
} }
}, [ }, [