fixed small logical error with startDrag()

This commit is contained in:
Eric Rowell
2013-03-24 20:54:59 -07:00
parent 5192ccd954
commit dc107a06ae
2 changed files with 6 additions and 2 deletions

View File

@@ -93,7 +93,11 @@
ap = this.getAbsolutePosition(), ap = this.getAbsolutePosition(),
animNode = layer || this; animNode = layer || this;
if(pos && !dd.node) { if(pos) {
if (dd.node) {
dd.node.stopDrag();
}
dd.node = this; dd.node = this;
dd.offset.x = pos.x - ap.x; dd.offset.x = pos.x - ap.x;
dd.offset.y = pos.y - ap.y; dd.offset.y = pos.y - ap.y;

View File

@@ -425,7 +425,7 @@
} }
//init stage drag and drop //init stage drag and drop
if(this.isDraggable()) { if(this.isDraggable() && !dd.node) {
this.startDrag(evt); this.startDrag(evt);
} }
}, },