David Catuhe 7 年之前
父节点
当前提交
f67701d493

文件差异内容过多而无法显示
+ 2962 - 2962
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 2962 - 2962
dist/preview release/babylon.module.d.ts


文件差异内容过多而无法显示
+ 5897 - 5897
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差异内容过多而无法显示
+ 5897 - 5897
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 4 - 0
dist/preview release/gui/babylon.gui.js

@@ -1550,6 +1550,10 @@ var BABYLON;
                 this.onPointerMoveObservable.clear();
                 this.onPointerOutObservable.clear();
                 this.onPointerUpObservable.clear();
+                if (this._root) {
+                    this._root.removeControl(this);
+                    this._root = null;
+                }
             };
             Object.defineProperty(Control, "HORIZONTAL_ALIGNMENT_LEFT", {
                 get: function () {

文件差异内容过多而无法显示
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


+ 6 - 3
gui/src/controls/control.ts

@@ -890,6 +890,11 @@ module BABYLON.GUI {
             this.onPointerMoveObservable.clear();
             this.onPointerOutObservable.clear();
             this.onPointerUpObservable.clear();
+
+            if (this._root) {
+                this._root.removeControl(this);
+                this._root = null;
+            }
         }
 
         // Statics
@@ -994,7 +999,6 @@ module BABYLON.GUI {
         }
 
         protected static drawEllipse(x:number, y:number, width:number, height:number, context:CanvasRenderingContext2D):void{
-
             context.translate(x, y);
             context.scale(width, height);
 
@@ -1003,8 +1007,7 @@ module BABYLON.GUI {
             context.closePath();
 
             context.scale(1/width, 1/height);
-            context.translate(-x, -y);
-            
+            context.translate(-x, -y);            
         }
     }    
 }