mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
fixed bug related to multiple removals of same node
This commit is contained in:
@@ -40,12 +40,15 @@ Kinetic.Container.prototype = {
|
||||
* @param {Node} child
|
||||
*/
|
||||
_remove: function(child) {
|
||||
if(child.name !== undefined) {
|
||||
this.childrenNames[child.name] = undefined;
|
||||
if(this.children[child.index].id == child.id) {
|
||||
if(child.name !== undefined) {
|
||||
this.childrenNames[child.name] = undefined;
|
||||
}
|
||||
|
||||
this.children.splice(child.index, 1);
|
||||
this._setChildrenIndices();
|
||||
child = undefined;
|
||||
}
|
||||
this.children.splice(child.index, 1);
|
||||
this._setChildrenIndices();
|
||||
child = undefined;
|
||||
},
|
||||
/**
|
||||
* draw children
|
||||
|
||||
Reference in New Issue
Block a user