Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api
In directory usw-pr-cvs1:/tmp/cvs-serv8410

Modified Files:
        dynlayer.js 
Log Message:
Fixed bug in adding layers to the .doc element

Index: dynlayer.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** dynlayer.js 2001/02/25 10:40:01     1.32
--- dynlayer.js 2001/02/26 16:58:13     1.33
***************
*** 143,155 ****
  };
  DynLayer.prototype.assignChildren=function() {
        var cl=this.children.length;
        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];
--- 143,152 ----
  };
  DynLayer.prototype.assignChildren=function() {
+       this.dyndoc.all[this.id]=this;
        var cl=this.children.length;
        for (var i=0; i<cl; i++) {
                var child=this.children[i];
                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];


_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs

Reply via email to