浏览代码

Fix potential recursive calls

Popov72 5 年之前
父节点
当前提交
c3c9526685
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;