Browse Source

Make sure the wheel only works when wheel is triggered.

Raanan Weber 9 years ago
parent
commit
242edc1aa2
1 changed files with 2 additions and 0 deletions
  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) {