Trevor Baron 7 лет назад
Родитель
Сommit
7b4fe75fe8

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

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

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

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

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

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