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

What is Framer? Join the Community
Return to index
Josh Ackerman
Posted Aug 10 - Read on Facebook

Hello,
Is there an alternative to bringToFront() that does not increment layer.index continually? For example, when clicking between two layers layerA, and layerB a few times, the end result is something like layerA.index = 13, and layerB.index = 12, when preferably the result would be layerA.index = 2, layerB.index = 1.
Thanks.

3 Comments

Jordan Robert Dobson

You would likely just have to do this yourself.

Benjamin Den Boer

Hey Josh Ackerman - if you're toggling between two layers and their indeces, you could also switch between "placeBefore(layerB)" and "placeBefore("layerA") instead. :-)

Josh Ackerman

I am actually trying to make this work for any number of layers. I would like to blur layers based on "how far away" they are from the front most layer.

Read the entire post on Facebook