浏览代码

Merge pull request #1075 from RaananW/arc-wheel-hotfix

Mouse Wheel sanity check
David Catuhe 9 年之前
父节点
当前提交
68c1b3e62f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Cameras/Inputs/babylon.arcrotatecamera.input.mousewheel.ts

+ 2 - 0
src/Cameras/Inputs/babylon.arcrotatecamera.input.mousewheel.ts

@@ -10,6 +10,8 @@ module BABYLON {
 
         public attachControl(element: HTMLElement, noPreventDefault?: boolean) {
             this._wheel = (p, s) => {
+                //sanity check - this should be a PointerWheel event.
+                if (p.type !== PointerEventType.PointerWheel) return;
                 var event = <MouseWheelEvent>p.event;
                 var delta = 0;
                 if (event.wheelDelta) {