Copy link to clipboard
Copied
I've managed to resize a text layer to a given width (in pixels), however, can't seem to figure out how to do so while maintaining a constant width/height ratio.
This seems simple enough, any ideas?
Thanks
doc.activeLayer.resize(newWidth, undefined, AnchorPosition.MIDDLECENTER);
doc.activeLayer.resize(newWidth, newWidth, AnchorPosition.MIDDLECENTER);
Use the same value as it is a percentage.
Copy link to clipboard
Copied
doc.activeLayer.resize(newWidth, newWidth, AnchorPosition.MIDDLECENTER);
Use the same value as it is a percentage.
Copy link to clipboard
Copied
Wow, so close. Simple enough. Thanks a lot!