Skip to main content

Hi there!


For some reason we get rotation: -180deg for the Customize your voice text in this file.


Is this a bug, or are we missing anything?


Thanks!

Tomer

There is no bug here. TextNode is actually rotated, as is its parent—“Thumbnail” frame.


How exactly? Right, the parent has rotation but the Figma UI shows no rotation for the text node, while in the API we get rotation: -180deg.


Screenshot 2024-10-10 at 9.08.49


It’s flipped horizontally. See constraints here:



I think I understand. So the -180deg compensates on the 180deg of the parent?


How can I detect flipping using the plugin API? Should I calculate the rotation of the text and its parent elements?


Thanks,

Tomer


Check the transform matrix (either relative or absolute) of a node to find whether it’s flipped:


figma.com

Reply