phetsims / scenery

Scenery is an HTML5 scene graph.
MIT License
54 stars 12 forks source link

Ability to flag a Node to use accurate "transformedBounds" #269

Closed jonathanolson closed 10 years ago

jonathanolson commented 10 years ago

Rotations currently use the fast way of computing bounds from children, but it increases the size of the bounds in a way undesirable for layout.

We should have an option, transformedBounds (default to false) that will trigger the more accurate way of computing things that will visit all descendants.

https://github.com/phetsims/kite/issues/24 is required for the Path handling, and we'll assume Text and Image types are still treated as rectangles.

Required for https://github.com/phetsims/balancing-chemical-equations/issues/77.

jonathanolson commented 10 years ago

Deciding for now to use "transformBounds" as the verb, instead of something that seems like it would be a getter FOR the transformed bounds.

jonathanolson commented 10 years ago

Added, see a visual example below with 2 rectangles: transformbounds

Closing.