Sfoglia il codice sorgente

Fix passive event warning in chrome

kaliatech 4 anni fa
parent
commit
88bc573f8d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/Inputs/scene.inputManager.ts

+ 1 - 1
src/Inputs/scene.inputManager.ts

@@ -848,7 +848,7 @@ export class InputManager {
                     ? "mousewheel" // Webkit and IE support at least "mousewheel"
                     : "DOMMouseScroll"; // let's assume that remaining browsers are older Firefox
 
-            elementToAttachTo.addEventListener(this._wheelEventName, <any>this._onPointerMove, false);
+            elementToAttachTo.addEventListener(this._wheelEventName, <any>this._onPointerMove, { passive: false });
         }
 
         if (attachDown) {