From 7981230a57ae1d7864e6bc576cc430379642d25e Mon Sep 17 00:00:00 2001 From: moklick Date: Thu, 5 Nov 2020 17:56:10 +0100 Subject: [PATCH] fix(panOnScroll): use deltaX instead of wheelDeltaX event prop --- src/container/ZoomPane/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/container/ZoomPane/index.tsx b/src/container/ZoomPane/index.tsx index 1c9da121..1c790fb5 100644 --- a/src/container/ZoomPane/index.tsx +++ b/src/container/ZoomPane/index.tsx @@ -78,8 +78,8 @@ const ZoomPane = ({ d3Zoom.translateBy( d3Selection, - (event.wheelDeltaX / currentZoom) * panOnScrollSpeed, - (event.wheelDeltaY / currentZoom) * panOnScrollSpeed + (event.deltaX / currentZoom) * panOnScrollSpeed, + (event.deltaY / currentZoom) * panOnScrollSpeed ); }) .on('wheel.zoom', null);