Browse Source

Fix potential recursive calls (#8757)

Popov72 5 năm trước cách đây
mục cha
commit
91da453e04

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

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