mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fixed gub with Container.remove() method which had bad logic removing children nodes
This commit is contained in:
@@ -85,10 +85,8 @@ Kinetic.Container = Kinetic.Node.extend({
|
||||
this._setChildrenIndices();
|
||||
|
||||
// remove children
|
||||
if(child.children) {
|
||||
for(var n = 0; n < child.children.length; n++) {
|
||||
child.remove(child.children[n]);
|
||||
}
|
||||
while(child.children && child.children.length > 0) {
|
||||
child.remove(child.children[0]);
|
||||
}
|
||||
|
||||
// do extra stuff if needed
|
||||
|
Reference in New Issue
Block a user