From: Benoit M. <mar...@ma...> - 2003-04-27 17:58:48
|
I've seen with IE, in several occasions, that wrapping a content in a table with one cell forces the layout engine to do the right thing. Give it a shot. Benoit On Sunday, April 27, 2003, at 09:50 AM, Raymond Irving wrote: > > --- Doug Melvin <do...@cr...> wrote: >> See attached document. >> note: this is a mozilla (NS6) specific bug. > > Wow! I wonder if this is a mozilla bug? If it is a bug > we might have to release a dynapi-mozilla patch for > this bug. > > Another thing to note is that in IE I also noticed > that had to set the width to 1 before it would return > the correct content size. Any ideas why? Any other > work around for both IE and mozilla getContentWidth() > problems? > > -- > Raymond Irving > >> >> --- >> Outgoing mail is certified Virus Free. >> Checked by AVG anti-virus system >> (http://www.grisoft.com). >> Version: 6.0.476 / Virus Database: 273 - Release >> Date: 4/24/2003 >> > --------------------------------- > Mozilla cotnentWidth > Bugdynapi.library.setPath('./src/ > ');dynapi.library.include('dynapi.api');ParentLayer > = new > DynLayer();ParentLayer.setBgColor('blue');ParentLayer.setSize(100,100); > ParentLayer.setLocation(50,200);ChildLayer > = new > DynLayer();ChildLayer.setBgColor('white');ChildLayer.setSize(100,100);C > hildLayer.setLocation(10,10);ChildLayer.setHTML('!');ParentLayer.addChi > ld(ChildLayer)dynapi.document.addChild(ParentLayer);function > doIt(){ alert('Child Layer\'s ContentWidth = ' + > ChildLayer.getContentWidth() + '\nChild Layer\'s > ContentHeight = ' + > ChildLayer.getContentHeight())}ParentLayerB = new > DynLayer();ParentLayerB.setBgColor('blue');ParentLayerB.setSize(150,150 > );ParentLayerB.setLocation(250,200);ChildLayerB > = new > DynLayer();ChildLayerB.setBgColor('white');ChildLayerB.setSize(100,100) > ;ChildLayerB.setLocation(10,10);ChildLayerB.setHTML('!');ParentLayerB.a > ddChild(ChildLayerB)dynapi.document.addChild(ParentLayerB);function > doItB(){ alert('Child Layer B\'s ContentWidth = ' + > ChildLayerB.getContentWidth() + '\nChild LayerB\'s > ContentHeight = ' + > ChildLayerB.getContentHeight())}This document > demonstartes the mozilla content size bug. > click here to get the content size of the child layer. > the expected results are contentWidth = 150 and > contentHeight = 150 > Note that the bug only occurs with the width > In case you did not notice. getContenWidth in Mozilla > will actually return the distance from a child layer's > left to the parent layer's right where the > childlayer's right extends beyond the parent layer's > right. > > If the child layer's area does not extend beyond the > parent layer's area then the value returned is that of > the real content width minus the left position of the > child layer.click here to get the content size of the > second child layer. > dynapi.document.insertAllChildren(); > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://www.mail-archive.com/dyn...@li.../ > |