prevent page bouncing when panOnScroll is enabled #359

This commit is contained in:
Christopher Möller
2020-11-03 16:10:24 +01:00
parent b88729fbf1
commit de1f7dba5d
+3
View File
@@ -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(