mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
fixed small logical error with startDrag()
This commit is contained in:
@@ -93,7 +93,11 @@
|
||||
ap = this.getAbsolutePosition(),
|
||||
animNode = layer || this;
|
||||
|
||||
if(pos && !dd.node) {
|
||||
if(pos) {
|
||||
if (dd.node) {
|
||||
dd.node.stopDrag();
|
||||
}
|
||||
|
||||
dd.node = this;
|
||||
dd.offset.x = pos.x - ap.x;
|
||||
dd.offset.y = pos.y - ap.y;
|
||||
|
@@ -425,7 +425,7 @@
|
||||
}
|
||||
|
||||
//init stage drag and drop
|
||||
if(this.isDraggable()) {
|
||||
if(this.isDraggable() && !dd.node) {
|
||||
this.startDrag(evt);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user