Hello, i am playing with varaibles, and i wanted to do a certain task that might solve a long running problem and didn’t succed. Then i thought to share it here in case it gets any interest…
The long running problem is that we cannot resize frames/images keeping their aspect ratio. In my case that would make the responsive conversion task much easier.
For now, I use a plugin that stores the initial aspect ratio and applies it back once I resized the frame. Not optimal but functional.
With the launch of variables, I RUSHED to try to do the following.
- Set an empty variable to store the current width of the object name: currentWidth
- Set another variable that makes the following calculation: currentWidth/2 and name it targetHeight.
That would make a 2:1 aspect ratio image.
By doing this, we could resize the component and the specified frame would keep its aspect ratio untouched.
I guess this is by no means how variables are supposed to work. or is it?