Skip to main content
Solved

How to rotate a node in a plugin and have the x and y position update automatically

  • October 14, 2022
  • 2 replies
  • 937 views

Daniel_A_Castro_Chin

When I rotate an object in Figma, i.e., set the rotation to X degrees, the X and Y position of the object update.

When I rotate an object in a plugin, by setting its rotation to a set value, the position values remain unchanged. Is there a way to rotate an object inside of a plugin, such that the position of that node is automatically updated like it is in the UI?

Best answer by Daniel_A_Castro_Chin

Hey Christian!

Yeah, basically I had to implement the rotation myself and set the relative transform accordingly. Here’s an example of someone doing this on Github: figma plugin to rotate selection around the center of itself. · GitHub.

View original
This topic has been closed for replies.

2 replies

Christian_Giordano1

Having the same issue. @Daniel_A_Castro_Chin did you figure this out? Thanks!


Daniel_A_Castro_Chin

Hey Christian!

Yeah, basically I had to implement the rotation myself and set the relative transform accordingly. Here’s an example of someone doing this on Github: figma plugin to rotate selection around the center of itself. · GitHub.


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