Re: Layout Information for SVG Elements
Steven Roussey <[email protected]> Tue, 24 Nov 2009 16:19:49 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <01bbe521-4eda-4510-8716-74a6cfb34b42@u18g2000pro.googlegroups.com> |
On Nov 24, 9:35 am, Boris Zbarsky <[email protected]> wrote: > On 11/24/09 12:32 PM, Steven Roussey wrote: > > > I suppose only the outside element would make sense -- it's size as > > part of a html doc assuming that it was embedded that way. > > That should already work; does it not? If not, what APIs are you using > to fill in the layout pane? Is it still doing the silly offset* thing > or something? Well... if the option "Show Bounding Client Rectangle" is selected, then it shows data. Otherwise, it does not. But anyway, if the option is off then it shows offsets and uses element.offset* which results in nothing, and height/width of NaN. With the option on it shows the bounding rectangle and uses element.getBoundingClientRect() -- but the values are wrong. Looking at the svg of a circle here: http://math.chapman.edu/~jipsen/mathml/asciimathandmathmlsvg.xhtml <svg:svg width="50px" height="50px"> <svg:circle cx="25px" cy="25px" r="20px" fill="green"/> </svg:svg> It says it has a width and height of 40px. Using Firebug to change the height/width settings has no effect on the getBoundingClientRect call. Strange...