Procházet zdrojové kódy

add missing clear to dispose

Trevor Baron před 7 roky
rodič
revize
7b4fe75fe8

+ 1 - 0
src/Gizmos/babylon.axisDragGizmo.ts

@@ -97,6 +97,7 @@ module BABYLON {
          * Disposes of the gizmo
          * Disposes of the gizmo
          */
          */
         public dispose(){
         public dispose(){
+            this.onSnapObservable.clear();
             this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver);
             this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver);
             this._dragBehavior.detach();
             this._dragBehavior.detach();
             super.dispose();
             super.dispose();

+ 1 - 0
src/Gizmos/babylon.axisScaleGizmo.ts

@@ -121,6 +121,7 @@ module BABYLON {
          * Disposes of the gizmo
          * Disposes of the gizmo
          */
          */
         public dispose(){
         public dispose(){
+            this.onSnapObservable.clear();
             this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver);
             this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver);
             this._dragBehavior.detach();
             this._dragBehavior.detach();
             super.dispose();
             super.dispose();

+ 1 - 0
src/Gizmos/babylon.planeRotationGizmo.ts

@@ -142,6 +142,7 @@ module BABYLON {
          * Disposes of the gizmo
          * Disposes of the gizmo
          */
          */
         public dispose(){
         public dispose(){
+            this.onSnapObservable.clear();
             this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver);
             this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver);
             this._dragBehavior.detach();
             this._dragBehavior.detach();
             super.dispose();
             super.dispose();