提交 a056b266 编写于 作者: J Jason Park

Prevent default wheel action when zooming

...@@ -63,6 +63,7 @@ class Renderer extends React.Component { ...@@ -63,6 +63,7 @@ class Renderer extends React.Component {
} }
handleWheel(e) { handleWheel(e) {
e.preventDefault();
const { deltaY } = e; const { deltaY } = e;
this.zoom *= Math.pow(this.zoomFactor, deltaY); this.zoom *= Math.pow(this.zoomFactor, deltaY);
this.zoom = Math.min(this.zoomMax, Math.max(this.zoomMin, this.zoom)); this.zoom = Math.min(this.zoomMax, Math.max(this.zoomMin, this.zoom));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部