Explorar o código

Fix potential recursive calls

Popov72 %!s(int64=5) %!d(string=hai) anos
pai
achega
c3c9526685
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Behaviors/Meshes/pointerDragBehavior.ts

+ 1 - 1
src/Behaviors/Meshes/pointerDragBehavior.ts

@@ -246,8 +246,8 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
      */
     public releaseDrag() {
         if (this.dragging) {
-            this.onDragEndObservable.notifyObservers({ dragPlanePoint: this.lastDragPosition, pointerId: this.currentDraggingPointerID });
             this.dragging = false;
+            this.onDragEndObservable.notifyObservers({ dragPlanePoint: this.lastDragPosition, pointerId: this.currentDraggingPointerID });
         }
 
         this.currentDraggingPointerID = -1;