flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: [FlexJS] SVG getBBox
Date Mon, 20 Mar 2017 18:58:03 GMT
The problem is that before it’s added to the DOM, the call causes an error in Firefox.

> On Mar 20, 2017, at 8:01 PM, OmPrakash Muppirala <bigosmallm@gmail.com> wrote:
> Width and height properties are fine for rectangular shapes.  For curves
> and paths,  we need the getBBox () method to get the true extents.
> I think this call  could be moved down the chain and called only when
> needed, i.e. for curves and non rectangular shapes.
> Moreover, the promise of the getBBox api is that it is available before the
> object is drawn on the DOM.  So, it seemed like a good idea at that time.
> In my testing, I found that Chrome had a bug for a long time that gave
> wrong extents for arcs.  Although that issue has been fixed recently.
> Overall, this seems to be working okay.  What do you think?
> Thanks,
> Om
> On Mar 19, 2017 1:46 AM, "Harbs" <harbs.lists@gmail.com> wrote:
> The SVG components that subclass GraphicShape use getBBox to feed the size
> into the resize method. This is a problem due to a Firefox bug which
> prevents the use of getBBox() before an SVG element is added to the
> document hierarchy.[1]
> I’m not sure I understand why getBBox() is being called at all. If the
> width and height is set, it seems to me like that should be used, and if
> not, why set a width and height at all?
> Harbs
> [1]https://bugzilla.mozilla.org/show_bug.cgi?id=612118 <
> https://bugzilla.mozilla.org/show_bug.cgi?id=612118>

View raw message