xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <mlundqui...@comcast.net>
Subject Re: need help w/ <flowRoot> + getBBox()
Date Thu, 14 Sep 2006 18:07:08 GMT

Hi Thomas,

All right, I think we're getting there...  Here's my new onload handler:

     function adjustHeight() {
       var text = document.getElementById ('text');
       var nch = text.getNumberOfChars();
       var lastCharBox = text.getExtentOfChar(nch-1);
       var boxHeight = lastCharBox.y + lastCharBox.height;
       var textContainer = document.getElementById ('text-container');
       textContainer.setAttributeNS (null, 'height', boxHeight);
       document.rootElement.setAttributeNS (null, 'height', boxHeight);
     }

(I didn't include the markup this time, it's the same as before with an 
@id="text-container" on the <rect>).

No exceptions thrown, the computed boxHeight is what I expect, but for 
some reason setting the heights on the rect and the root don't appear to 
have any effect...?

Thanks a lot,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message