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

What is Framer? Join the Community
Return to index
Noah Tsutsui
Posted Sep 04 - Read on Facebook

How exactly does layer order work? It seems like an easy topic, but I just can't figure this out: Why is "selected" always under "buttons" in this case?

buttons.addSubLayer(share)
buttons.addSubLayer(reply)
buttons.addSubLayer(action)
share.addSubLayer(a.share_icon)
reply.addSubLayer(a.reply_icon)
action.addSubLayer(a.action_icon)
a.share_icon.center()
a.share_icon.y = 25
a.reply_icon.center()
a.reply_icon.y = 5
a.action_icon.center()
a.action_icon = 5

a.selected.bringToFront()
buttons.z = 1
action.z = 1
a.action_icon.z = 1
a.selected.z = 10000

Do root layers never overlap sublayers?

2 Comments

Koen Bok

Yup. Sublayers are always on top of super layers. Think of it as a stack of cards, with the root layer being the most back one.

Noah Tsutsui

But consider two superlayers (A and B) with sublayers... can't superlayerA ever sit over sublayer of superlayerB?

Read the entire post on Facebook