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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to