|
From: Robert R. <rra...@ya...> - 2000-11-05 07:37:43
|
It seems like deleteAllChildren is not very consistent with
deleteChild.
Shouldn't deleteAllChildren be like this:
DynLayer.prototype.deleteAllChildren=function() {
for (var i=0;i<this.children.length;i++)
this.deleteChild(this.children[i])
}
The only problem is that is that it would take forever because each
call would be nested in a for loop in the deleteChild method. Maybe a
childrenID array?
Another idea for the .all and .allID arrays
is to store the .all index of the object in the .allID array for the
object. Then we could remove
the numerous for loops looking for it and the for loops that delete it
in the .all array. Then we could say this.all[this.allID[someid].index].
\\Robert
--
|