Inconsistency in handling width and height for rotated components
I’ve been recently working on a component that contained rotated label in it and I discovered that using width and height attributes (MXML) in such case might result in unexpected behaviour.
The problem occurs when you start using absolute values for these properties. If for example you set height to be 100% then actual height of the component will be influenced. However if you set height to be 500, width of the component will be changed instead.
It turns out, that percent size (which is calculated relative to parent and post-transform) would take component’s rotation into account while explicit size is calculated pre-transform (which is a change in Flex 4). While it is all working according to specification trying to use “proxy setters” like width/height might cause some confusion.
You can use this little app to try it.