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
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.
Well, here is a little simplified version of what I am trying to do.
LayerA = new Layer
LayerB = new Layer opacity: 0LayerC = new Layer superLayer: LayerA
# this one worksLayerA.onClick -> LayerB.animate properties: opacity: 1
# but this one doesn't LayerC.onClick -> LayerB.animate properties: opacity: 1
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 https://drive.google.com/file/d/0B8HOLKx9tG0UMmxiTlR3Ym8xYTg/view?usp=sharing