fixed gub with Container.remove() method which had bad logic removing children nodes

This commit is contained in:
Eric Rowell 2012-07-04 22:04:03 -07:00
parent 26e753b90c
commit d28d2c910d
3 changed files with 6 additions and 10 deletions

View File

@ -1486,10 +1486,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

File diff suppressed because one or more lines are too long

View File

@ -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