Skip to main content
July 7, 2023
Solved

How to set anchor point for resizing

  • July 7, 2023
  • 1 reply
  • 3612 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()?

This topic has been closed for replies.
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.

1 reply

Gleb
GlebAnswer
Power Member
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.