Преглед изворни кода

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) {