Explorar o código

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

Mouse Wheel sanity check
David Catuhe %!s(int64=9) %!d(string=hai) anos
pai
achega
68c1b3e62f

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