Re: Layout Information for SVG Elements
Rick <[email protected]> Tue, 24 Nov 2009 15:04:10 -0500
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Nov 24, 2009 at 2:52 PM, Robert O'Callahan <[email protected]>wrote: > 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. > > It occurred to me to mention bounding boxes. Transform nesting might be useful. Since it is a large display, maybe show a bounding box transformed against the client rect. Rendering the element inside it would be sweet if it wasn't too difficult. Styling. It would be useful to have some way to navigate up the style tree to see where things are set. The Style window shows class information. (I always use classes, so I don't know what else is there.) -- Cheers! Rick