Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api
In directory usw-pr-cvs1:/tmp/cvs-serv14564
Modified Files:
dynlayer.js dyndocument.js
Log Message:
NS resize fixes
Index: dynlayer.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** dynlayer.js 2001/05/10 03:49:35 1.51
--- dynlayer.js 2001/05/31 10:17:50 1.52
***************
*** 27,32 ****
DynLayer.prototype = new DynObject();
DynLayer.prototype.isDynLayer = true;
! DynLayer.prototype.specificCreate=function() {
! if (this.created||!this.parent||this.elm!=null) return;
if (is.ns6) {
--- 27,32 ----
DynLayer.prototype = new DynObject();
DynLayer.prototype.isDynLayer = true;
! DynLayer.prototype.specificCreate=function(recreate) {
! if (!recreate&&(this.created||!this.parent||this.elm!=null)) return null;
if (is.ns6) {
***************
*** 48,55 ****
} else if (is.ns4) {
var recycled=this.parent.doc.recycled;
! if (recycled && recycled.length>0) {
! this.elm=recycled[0];
Methods.removeFromArray(recycled,recycled[0]);
} else {
this.elm=new Layer(this.w,this.parent.elm);
this.elm.captureEvents(Event.LOAD);
--- 48,56 ----
} else if (is.ns4) {
var recycled=this.parent.doc.recycled;
! if (recycled && recycled.length>0 && !recreate) {
! this.elm=recycled[0];
Methods.removeFromArray(recycled,recycled[0]);
} else {
+ if (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.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** dyndocument.js 2001/05/08 17:23:30 1.12
--- dyndocument.js 2001/05/31 10:17:50 1.13
***************
*** 22,25 ****
--- 22,27 ----
};
DynDocument.prototype.specificCreate=function() {
+ if(is.ns4) DynAPI.addResizeFunction(this+".resizeHandler()");
+ else DynAPI.addResizeFunction(this+".findDimensions();");
};
DynDocument.prototype.specificRemove=function() {
***************
*** 57,60 ****
this.doc.location = path;
};
DynAPI.addLoadFunction("DynAPI.document = DynAPI.addChild(new
DynDocument(self));DynAPI.document.all = DynObject.all;")
- DynAPI.addResizeFunction("if (DynAPI.document) DynAPI.document.findDimensions();");
--- 59,71 ----
this.doc.location = path;
};
+ // Will only be executed in NS4
+ DynDocument.prototype.resizeHandler=function() {
+ var w=this.w;
+ var h=this.h;
+ 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);
+ };
+ };
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