Skip to main content
Question

Getting wrong rotation value


Tomer_Gabbai

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
  • 4873 replies
  • October 9, 2024

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


Tomer_Gabbai

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
  • 4708 replies
  • October 10, 2024

It’s flipped horizontally. See constraints here:


Tomer_Gabbai

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
  • 4708 replies
  • November 18, 2024

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

figma.com

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings