Skip to main content
Tomer_Gabbai
Oct 9, 2024 9:37 AM UTC
Question

Getting wrong rotation value

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

This topic has been closed for replies.

5 replies

tank666
Oct 9, 2024 7:06 PM UTC

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

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Tomer_Gabbai
Oct 10, 2024 6:43 AM UTC

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

Gleb
Power Member
Oct 10, 2024 7:05 AM UTC

It’s flipped horizontally. See constraints here:

Tomer_Gabbai
Oct 10, 2024 7:37 AM UTC

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

Gleb
Power Member
Nov 18, 2024 5:28 PM UTC

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

figma.com