Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api
In directory usw-pr-cvs1:/tmp/cvs-serv32089
Modified Files:
dynlayer.js
Log Message:
Removed .addChildID - .all id's are now set in assignChildren
Index: dynlayer.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** dynlayer.js 2001/02/24 21:48:03 1.30
--- dynlayer.js 2001/02/25 08:54:41 1.31
***************
*** 141,144 ****
--- 141,150 ----
for (var i=0; i<cl; i++) {
var child=this.children[i];
+ if (this.dyndoc.all[child.id]) {
+ alert('Attempt to add "'+child.id+'" to the document
+"'+this.dyndoc.id+'" failed.\n\nThe DynLayer already exists in that
+DynDocument.\n\nYou must remove the dynlayer from its parent first.');
+ return;
+ }
+ this.dyndoc.all[child.id]=child;
+ child.dyndoc=this.dyndoc;
if (is.ns4) var elm=this.doc.layers[child.id];
else if (is.ie) var elm=this.elm.all[child.id];
***************
*** 176,194 ****
return
(this.created)?'DynAPI.getDocument("'+this.dyndoc.id+'").all["'+this.id+'"]':'DynLayer.unassigned["'+this.id+'"]';
};
- DynLayer.prototype.addChildID=function(child) {
- child.dyndoc=this.dyndoc;
- if (this.dyndoc.all[child.id]) {
- alert('Attempt to add "'+child.id+'" to the document
"'+this.dyndoc.id+'" failed.\n\nThe DynLayer already exists in that
DynDocument.\n\nYou must remove the dynlayer from its parent first.');
- return;
- }
- for (var i=0;i<child.children.length;i++) child.addChildID(child.children[i]);
- DynAPI.removeFromArray(DynLayer.unassigned,child,true);
- this.dyndoc.all[child.id]=child;
- };
DynLayer.prototype.addChild=function(child) {
if (child.created) child.removeFromParent();
child.parent=this;
child.isChild=true;
- if (this.dyndoc) this.addChildID(child);
this.children[this.children.length]=child;
if (this.created) child.createElement();
--- 182,189 ----
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs