This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Chris Chiusano
Posted Jun 10 - Read on Facebook

I have a rectangle that is centered on the page and on click I want to have it's width expand so it becomes a rectangle. The issue i'm having is it only grows on the right side, is there a way to have it expand from the middle?

3 Comments

Wael Jawadi

give me the script i will try to fix it

Benjamin Den Boer

Hey Chris Chiusano - there's a couple of ways of going about this. If you don't want to use scale/scaleX or scaleY (which have origins set to 0.5 by default) you can replicate the same effect with width/height/x/y - you simply need to offset the layer accordingly. Made this little example for you to illustrate: http://share.framerjs.com/710eu2ws4d0l/ - hope that helps. :-)

Chris Chiusano

yes! Thank Benjamin Den Boer this is just what I was looking for! Thank you!

Read the entire post on Facebook