فهرست منبع

add missing clear to dispose

Trevor Baron 7 سال پیش
والد
کامیت
7b4fe75fe8
3فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 1 0
      src/Gizmos/babylon.axisDragGizmo.ts
  2. 1 0
      src/Gizmos/babylon.axisScaleGizmo.ts
  3. 1 0
      src/Gizmos/babylon.planeRotationGizmo.ts

+ 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();