here's a sample:

DynLayer.prototype.getChildrenWidth=function() {
    var maxX=0;
    for (var i=0; i<this.children.length; i++) if (this.children[i].getX()+this.children[i].getWidth() > maxX) maxX = this.children[i].getX()+this.children[i].getWidth();
    return maxX;
};
DynLayer.prototype.getChildrenHeight=function() {
    var maxY=0;
    for (var i=0; i<this.children.length; i++) if (this.children[i].getY()+this.children[i].getHeight() > maxY) maxY = this.children[i].getY()+this.children[i].getHeight();
    return maxY;
};

Doug Melvin wrote:

I've just discovered that getContentHeight/Widthdoesn't notice dynlayers.. What I mean is, I add a dynlayer to another dynlayer,I move the nested dynlayer so that is it way out of the viewable area of the outer layer..( .moveTo(0,500) )then I call getContentHeight for the outer layer, which returns 0!! eh? Doug
---
Outgoing mail is certified Virus Free by AVG Free Edition
Download at: http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01


--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
 

Reply via email to