Prevent default wheel action when zooming

This commit is contained in:
Jason Park
2019-01-23 11:51:46 -05:00
parent de8cd9685e
commit a056b266d4

View File

@@ -63,6 +63,7 @@ class Renderer extends React.Component {
}
handleWheel(e) {
e.preventDefault();
const { deltaY } = e;
this.zoom *= Math.pow(this.zoomFactor, deltaY);
this.zoom = Math.min(this.zoomMax, Math.max(this.zoomMin, this.zoom));