Skip to main content
Solved

How to set anchor point for resizing

  • July 7, 2023
  • 1 reply
  • 2972 views

In my plugin, when I select some layers, I want them to always resize with respect to its top left or right corner like so:

However, it seems to always resize with respect to its bottom left corner for some reason:

Is there a way to specify an anchor point when i’m resizing a node aka when calling node.resize()?

Best answer by Gleb

This happens because your node is flipped/rotated.

You can’t set an anchor point but you can move the object to desired coordinates. All operations are done in relation to top left corner of the object.

View original
This topic has been closed for replies.

1 reply

Gleb
  • Power Member
  • 4710 replies
  • Answer
  • July 7, 2023

This happens because your node is flipped/rotated.

You can’t set an anchor point but you can move the object to desired coordinates. All operations are done in relation to top left corner of the object.


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