Re: Layout Information for SVG Elements

Robert O'Callahan <[email protected]> Wed, 25 Nov 2009 08:52:20 +1300
Newsgroups gmane.comp.mozilla.devel.svg
Organization Mozilla Corporation
Message-ID <[email protected]>
On 24/11/09 3:24 PM, Steven Roussey wrote:
> Looking at Issue 1953 for Firebug, I can see that Firebug does not do
> anything useful for SVG elements in the layout panel. The layout panel
> displays basic information about an element (height/width, padding,
> margin, offset). I'd like to get at least some basic information for
> SVG, and perhaps setup the panel to be extensible for a Firebug-SVG-
> extension. I already have the Edit button for a SVG element have a
> hook for a extension developer to swap their editor.
>
> But back to the issue at hand:
>
> http://code.google.com/p/fbug/issues/detail?id=1953
>
> What basic information could be there, and how to get it?

element.getBoundingClientRect() will give you a true bounding box 
relative to the viewport. element.getBBox() will give you the bounding 
box of the shape excluding stroke extents.

Rob