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

What is Framer? Join the Community
Return to index
Eric Poindessault
Posted Dec 14 - Read on Facebook

Hey guys, I'm very new to Framer JS and I'm desperately trying to place a scrollable layer (using scrollComponent.wrap) behind other layers, but it remains on top no matter what. Once created the ScrollComponent is placed on top of the other layers and when I try to apply different z-indexes with the .z property it doesn't work. Can someone help me with this?

7 Comments

Joshua Dickens

Try layer.sendToBack()

Eric Poindessault

Thanks Joshua, it worked but now the layer is not scrollable anymore... :/ I had a bunch of event.stopPropagation() but I removed them

Joshua Dickens

Ah, perhaps there's another layer that's in front of it. Instead of sendToBack, maybe try layer.placeBehind(layer2)? you can use the layers list on the right of the ditor to see which layer you need to place behind…

Eric Poindessault

Ok sounds good I'll try that, thanks!

Arved Baumgärtner

You can also create a new layer and use it as a rootLayer. To bring other layers to front, you can simply name the rootLayer as their superlayer

Arved Baumgärtner

rootLayer = new Layer
width: Screen.width
height: Screen.height
backgroundColor: null

bringThisLayerToFront.superLayer = rootLayer

Eric Poindessault

Thanks Arved, I did the reverse operation in the end and placed the scroll component as a sub layer of the layer that contained the one I needed to place on the front.

Read the entire post on Facebook