flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OmPrakash Muppirala <bigosma...@gmail.com>
Subject Re: [FlexJS] SVG getBBox
Date Mon, 20 Mar 2017 18:01:49 GMT
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?


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?


[1]https://bugzilla.mozilla.org/show_bug.cgi?id=612118 <

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message