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

What is Framer? Join the Community
Return to index
John Grendon Enderby
Posted Feb 19 - Read on Facebook

OK, so this might be a basic question for some, but I've been banging my head about this for a while on some of my demos. Let say I have an array of layers, and I want to animate 1 layer one way and all the others another. Is the only way to this by using state switching? Or is it possible to say if this layer isn't the one that is clicked, either reverse the animation or stay the same?

Link here if it helps.

Not sure if there are other things I can do to tidy stuff up, but any help/advice on that front would be appreciated too!

8 Comments

Ben Rodenhäuser

Maybe like this: http://share.framerjs.com/atyl8qxbu3fm/ (not sure how well this will generalize to other cases)

Ben Rodenhäuser

As for tidying up, you could write 'y: logo.height + (i * 69)' in your for loop, which would position your buttons like you want it to begin with.

John Grendon Enderby

Thanks Ben. I'll have another look when I'm back in the office!

Ben Rodenhäuser

Hi John Grendon Enderby, the code I gave you is buggy. I fixed it now (I hope :-)): http://share.framerjs.com/66pe8wkxei2j/

Ben Rodenhäuser

And another fix: For reasons I don't fully understand, we need to set the text color using the color property rather than the CSS style. Here: http://share.framerjs.com/xsouy9rqjce1/

Ben Rodenhäuser

Sorry for the chaos, I am not an expert coder myself :-)

John Grendon Enderby

It's fine, we're getting to the bottom of it between us! Thanks for the help! :)

Ben Rodenhäuser

Yeah, I think now it works as intended, finally ;)

Read the entire post on Facebook