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

What is Framer? Join the Community
Return to index
Paul Kooi
Posted Feb 09 - Read on Facebook

Hi. I have a layer ( layerA ) that has two states. The state change is both it's position and it's height/width. I have another layer ( layerB ) that's parent is layerA. When ( onClick ) I change the state of layerA I would expect layerB's position and scale to change relative to it's parent.

Instead the scale isn't affected at all, and I get a double translation as it's position changes?

I've tried Parent, Super Layer, and I've tried Aligning both it's horizontal and vertical position?

Anyone have any ideas how I can animate the position of a layer while handling scale and avoiding double translations?

Thanks in advance.


Aalok Trivedi

do you mind sharing your project? I'm having a hard time picturing what you're describing and seeing the setup would help

Paul Kooi

sure here you go. I made a simple example since the other one is too big. If you click on the large box you will see the problem. My goal is that when it scales and translates that the second layer keep it's position relative to the change. I want it to act like the child of the parent. layerA

Aalok Trivedi

ah ok, I see. Yea, framer uses absolute positioning. Changing the widths and heights won't affect the children unless you add listeners such as change:x, change:height, etc... I would look at kvyns ios and material kit modules that use constraints. It doesn't really play nice with states but it's super helpful

Aalok Trivedi

Annoying, but Im not sure how to do it another way, outside of modules

Read the entire post on Facebook