mirror of
https://github.com/konvajs/konva.git
synced 2025-12-17 18:01:15 +08:00
Fixed "calling remove() for dragging shape will throw an error". close #184
This commit is contained in:
@@ -1156,7 +1156,9 @@
|
||||
moveTo: function(newContainer) {
|
||||
// do nothing if new container is already parent
|
||||
if (this.getParent() !== newContainer) {
|
||||
this.remove();
|
||||
// this.remove my be overrided by drag and drop
|
||||
// buy we need original
|
||||
(this.__originalRemove || this.remove).call(this);
|
||||
newContainer.add(this);
|
||||
}
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user