Sebastien Vandenberghe 8 vuotta sitten
vanhempi
commit
c460fd1d04

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 583 - 583
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 4 - 4
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -10705,7 +10705,7 @@ var BABYLON;
             // Events
             window.removeEventListener("blur", this._onBlur);
             window.removeEventListener("focus", this._onFocus);
-            this._renderingCanvas.removeEventListener("blur", this._onCanvasBlur);
+            this._renderingCanvas.removeEventListener("pointerout", this._onCanvasBlur);
             document.removeEventListener("fullscreenchange", this._onFullscreenChange);
             document.removeEventListener("mozfullscreenchange", this._onFullscreenChange);
             document.removeEventListener("webkitfullscreenchange", this._onFullscreenChange);
@@ -31414,6 +31414,9 @@ var BABYLON;
             ]);
         };
         ArcRotateCameraPointersInput.prototype.detachControl = function (element) {
+            BABYLON.Tools.UnregisterTopRootEvents([
+                { name: "blur", handler: this._onLostFocus }
+            ]);
             if (element && this._observer) {
                 this.camera.getScene().onPointerObservable.remove(this._observer);
                 this._observer = null;
@@ -31430,9 +31433,6 @@ var BABYLON;
                 this._onLostFocus = null;
                 this._onContextMenu = null;
             }
-            BABYLON.Tools.UnregisterTopRootEvents([
-                { name: "blur", handler: this._onLostFocus }
-            ]);
             this.camera = null;
         };
         ArcRotateCameraPointersInput.prototype.getClassName = function () {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 583 - 583
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 4 - 4
src/Cameras/Inputs/babylon.arcRotateCameraPointersInput.ts

@@ -206,6 +206,10 @@ module BABYLON {
         }
 
         public detachControl(element: HTMLElement) {
+            Tools.UnregisterTopRootEvents([
+                { name: "blur", handler: this._onLostFocus }
+            ]);
+
             if (element && this._observer) {
                 this.camera.getScene().onPointerObservable.remove(this._observer);
                 this._observer = null;
@@ -226,10 +230,6 @@ module BABYLON {
                 this._onContextMenu = null;
             }
 
-            Tools.UnregisterTopRootEvents([
-                { name: "blur", handler: this._onLostFocus }
-            ]);
-
             this.camera = null;
         }
 

+ 1 - 1
src/babylon.engine.ts

@@ -4071,7 +4071,7 @@
             // Events
             window.removeEventListener("blur", this._onBlur);
             window.removeEventListener("focus", this._onFocus);
-            this._renderingCanvas.removeEventListener("blur", this._onCanvasBlur);
+            this._renderingCanvas.removeEventListener("pointerout", this._onCanvasBlur);
             document.removeEventListener("fullscreenchange", this._onFullscreenChange);
             document.removeEventListener("mozfullscreenchange", this._onFullscreenChange);
             document.removeEventListener("webkitfullscreenchange", this._onFullscreenChange);