From 3f0e89cd952b515ee0b6be025633a22f454b5543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B0=D0=B2=D1=80=D1=91=D0=BD=D0=BE=D0=B2=20=D0=90?= =?UTF-8?q?=D0=BD=D1=82=D0=BE=D0=BD?= Date: Thu, 8 May 2014 10:14:43 +0800 Subject: [PATCH] better detecting 'empty' dragging --- src/DragAndDrop.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/DragAndDrop.js b/src/DragAndDrop.js index 1b558a28..3791c384 100644 --- a/src/DragAndDrop.js +++ b/src/DragAndDrop.js @@ -141,9 +141,8 @@ this.setAbsolutePosition(newNodePos); - if (!this._lastPos || - this._lastPos.x !== newNodePos.x || - this._lastPos.y !== newNodePos.y) { + if (this._lastPos && this._lastPos.x === newNodePos.x && + this._lastPos.y === newNodePos.y) { dd.anim.dirty = true; }