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

What is Framer? Join the Community
Return to index
Kai Daniels
Posted Aug 25 - Read on Facebook

I can't get the green layer to be the topmost layer, anyone know any solutions?

3 Comments

Joshua Tucker

Hi Kai! Looking at your code, it looks like you're trying to set "interactionArea's" z property to a huge number in an attempt to bring to front, is that correct? A layer's z property defines its placement in space, not its z-index (which is layer.index).

http://framerjs.com/docs/#layer.index

To solve your issue, I'd recommend looking into four functions – layer.placeBefore, layer.placeBehind, layer.bringToFront, and layer.sendToBack. Each of these will help you arrange layers in the hierarchy. You can also specify a layer's index explicitly like so:

layer.index = 5

All described in the Framer Docs – http://framerjs.com/docs/

How I solved your issue with your project is that right before you declared your animations and event functions, I put "interactionArea.bringToFront()".

Kai Daniels

Thank you so much!

Joshua Tucker

Kai Daniels Of course! Keep up the building, my friend.

Read the entire post on Facebook