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

What is Framer? Join the Community
Return to index
Tuguldur Tuvshinbayar
Posted Aug 02 - Read on Facebook

Hey everyone, can someone explain me the relation between superlayers and sublayers. For some reason, I can't manage to make onTap and onClick functions work on sublayers whereas those event listeners seem to be perfectly working on superlayers


Isa Bison

Can't say without code, but it may be worth noting that mouse events on the container are only trigger when the event is within the contaoner's frame. Taps on children where the tal is outside the frame will not trigger an event.

Tuguldur Tuvshinbayar

Well, here is a little simplified version of what I am trying to do.

LayerA = new Layer

LayerB = new Layer
opacity: 0
LayerC = new Layer
superLayer: LayerA

# this one works
LayerA.onClick ->
properties: opacity: 1

# but this one doesn't
LayerC.onClick ->
properties: opacity: 1

Tuguldur Tuvshinbayar

The taps are happening inside the container's frame, though the animation is supposed to happen outside from both the children and container's frame.
Here is the .coffee file if you need

Read the entire post on Facebook