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

Modified Files:
        dynlayer.js dyndocument.js 
Log Message:
Recreate changes

Index: dynlayer.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** dynlayer.js 2001/06/10 22:40:43     1.56
--- dynlayer.js 2001/06/10 22:44:28     1.57
***************
*** 26,33 ****
  };
  DynLayer.prototype = new DynObject();
- DynLayer.recreate = false;
  DynLayer.prototype.isDynLayer = true;
  DynLayer.prototype.specificCreate=function() {
!       if (!DynLayer.recreate&&(this.created||!this.parent||this.elm!=null)) return 
null;
        if (is.ns6) {
                var 
parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body;
--- 26,32 ----
  };
  DynLayer.prototype = new DynObject();
  DynLayer.prototype.isDynLayer = true;
  DynLayer.prototype.specificCreate=function() {
!       if (!DynObject.recreate&&(this.created||!this.parent||this.elm!=null)) return 
null;
        if (is.ns6) {
                var 
parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body;
***************
*** 48,56 ****
        } else if (is.ns4) {
                var recycled=this.parent.doc.recycled;
!               if (recycled && recycled.length>0 && !DynLayer.recreate) {
                this.elm=recycled[0];
                        Methods.removeFromArray(recycled,recycled[0]);
                } else {
!                       if (DynLayer.recreate) this.parent.doc.recycled=[];
                        this.elm=new Layer(this.w,this.parent.elm);
                        this.elm.captureEvents(Event.LOAD);
--- 47,55 ----
        } else if (is.ns4) {
                var recycled=this.parent.doc.recycled;
!               if (recycled && recycled.length>0 && !DynObject.recreate) {
                this.elm=recycled[0];
                        Methods.removeFromArray(recycled,recycled[0]);
                } else {
!                       if (DynObject.recreate) this.parent.doc.recycled=[];
                        this.elm=new Layer(this.w,this.parent.elm);
                        this.elm.captureEvents(Event.LOAD);

Index: dyndocument.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dyndocument.js,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** dyndocument.js      2001/06/03 02:20:02     1.14
--- dyndocument.js      2001/06/10 22:44:28     1.15
***************
*** 22,27 ****
  };
  DynDocument.prototype.specificCreate=function() {
!       if(is.ns4) DynAPI.addResizeFunction(this+".resizeHandler()");
!       else DynAPI.addResizeFunction(this+".findDimensions();");
  };
  DynDocument.prototype.specificRemove=function() {
--- 22,26 ----
  };
  DynDocument.prototype.specificCreate=function() {
!       DynAPI.addResizeFunction(this+".resizeHandler()");
  };
  DynDocument.prototype.specificRemove=function() {
***************
*** 59,73 ****
        this.doc.location = path;
  };
- // Will only be executed in NS4
  DynDocument.prototype.resizeHandler=function() {
        var w=this.w;
        var h=this.h;
-       DynLayer.recreate=true;
        this.findDimensions();
!       if(w!=this.w || h!=this.h) {
!                       var l=this.children.length;
!                       for (var i=0;i<l;i++) this.children[i].specificCreate(true);
        }
-       DynLayer.recreate=false;
  };
  DynAPI.addLoadFunction("DynAPI.document = DynAPI.addChild(new 
DynDocument(self));DynAPI.document.all = DynObject.all;")
--- 58,74 ----
        this.doc.location = path;
  };
  DynDocument.prototype.resizeHandler=function() {
        var w=this.w;
        var h=this.h;
        this.findDimensions();
!       if (is.ns4) {
!               DynObject.recreate=true;
!               if(w!=this.w || h!=this.h) {
!                               var l=this.children.length;
!                               for (var i=0;i<l;i++) 
this.children[i].specificCreate(true);
!               }
!               DynObject.recreate=false;
        }
  };
+ DynObject.recreate = false;
  DynAPI.addLoadFunction("DynAPI.document = DynAPI.addChild(new 
DynDocument(self));DynAPI.document.all = DynObject.all;")


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

Reply via email to