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

What is Framer? Join the Community
Return to index
Francois W Brahic
Posted Sep 15 - Read on Facebook

Hey guys! Is there a way to display a parent layer in front of its children layers? I seem to be unable to bring it forward, but I am new to this so I'm probably missing something obvious! Thanks.


Diego Bernabé

Hi Francois W Brahic, you can use: layer.bringToFront()

Juan J. Ramirez

Francois W Brahic I don't think there's a way to do that. That's basically breaking the cascade. You cannot insert a Node where it doesn't belong. That's also known as a Hierarchy error. (You can easily test this by trying to make a children a superlayer of its will get a DOM exception.)

The only way to use the existing Framer methods for altering the index, is to use them on sibling layers or layers that don't share the same parent.

You can always change the parent-children relationship programmatically with very simple code and perhaps achieve what you want to do. You can fire an event to invert the relationship of two layers (change their properties). However, I think the best approach is to simply unwrap those layers, so you can use the built-in methods to change their index properties.

Diego Bernabé

Read the entire post on Facebook