From de1f7dba5ddcd7073e7e720d8e9d1c8fd96d3594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Mo=CC=88ller?= Date: Tue, 3 Nov 2020 16:10:24 +0100 Subject: [PATCH] prevent page bouncing when panOnScroll is enabled #359 --- src/container/ZoomPane/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/container/ZoomPane/index.tsx b/src/container/ZoomPane/index.tsx index 8b7e5000..1c9da121 100644 --- a/src/container/ZoomPane/index.tsx +++ b/src/container/ZoomPane/index.tsx @@ -71,6 +71,9 @@ const ZoomPane = ({ if (panOnScroll) { d3Selection .on('wheel', (event: any) => { + event.preventDefault(); + event.stopImmediatePropagation(); + const currentZoom = d3Selection.property('__zoom').k || 1; d3Zoom.translateBy(