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

What is Framer? Join the Community
Return to index
Tien Bach
Posted Mar 09 - Read on Facebook

Hello there,

I have a question regarding stacked layers and their event listeners occurring at the same time.

Here’s what I’m trying to do: I’m working off a flipcard module in which each card is a parent container layer holding two children layers (one for the front and one for the back) - three layers total.

The container has a click event that makes the card flip and the back layer has an event listener that will do something else, in this case, make the second card disappear. Because these layers are stacked on top one another, clicking will enable both events to occur (1. the flip and 2. the disappearance of the second card). How can I get one event to occur at a time, despite being stacked on top each other?

Your help is much appreciated 🙏

Also, I haven’t had much luck with the .ignoreEvents method

2 Comments

Steve Ruiz

Look into the layer property called ignoreEvents. This property is false by default. Of the front/back layers, you'll want the one facing away from the viewer to have ignoreEvents = true, and whichever one is facing toward the viewer (and the one you want events to be triggered on) to have ignoreEvents = false.

Tien Bach

Appreciate your help, Steve :)

Read the entire post on Facebook