Sfoglia il codice sorgente

Merge pull request #6661 from RamilKadyrov/master

Fix Scene.InputManager.detachControl: Wheel event was not detached.
David Catuhe 6 anni fa
parent
commit
2b7e502e35
2 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 1 0
      dist/preview release/what's new.md
  2. 1 0
      src/Inputs/scene.inputManager.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -118,6 +118,7 @@
 - Fix useObjectOrienationForDragging for pointerDragBehavior when using a single axis drag ([TrevorDev](https://github.com/TrevorDev))
 - Fix VR button not positioning correctly in canvas ([haroldma](https://github.com/haroldma))
 - Fix check for material needing alpha blending in OutlineRenderer ([mkmc](https://github.com/mkmc))
+- Fixed: scene's input manager's detachControl doesn't remove a wheel event listener ([RamilKadyrov](https://github.com/RamilKadyrov))
 
 ## Breaking changes
 - Setting mesh.scaling to a new vector will no longer automatically call forceUpdate (this should be done manually when needed) ([TrevorDev](https://github.com/TrevorDev))

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

@@ -822,6 +822,7 @@ export class InputManager {
 
         // Pointer
         canvas.removeEventListener(eventPrefix + "move", <any>this._onPointerMove);
+        canvas.removeEventListener(this._wheelEventName, <any>this._onPointerMove);
         canvas.removeEventListener(eventPrefix + "down", <any>this._onPointerDown);
         window.removeEventListener(eventPrefix + "up", <any>this._onPointerUp);