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

What is Framer? Join the Community
Return to index
Joe Lifrieri
Posted May 13 - Read on Facebook

Hey, I'm having trouble with hidden layers intercepting events.

I know about using @.ignoreEvents to disable event listeners on a layer, but its really frustrating that adding an .ignoreEvents to a parent layer doesn't disable events for all child layers. Rather than it cascading down, I have to manually enable and disable every event listener when it shows and hides.

Is there a better way to do this?

2 Comments

Joe Lifrieri

"Hidden layers" == opacity: 0

Marcelo Eduardo Oliveira

Hey Joe, I feel you pain ;).
What I did and works OK for me is I extended the layer class with a custom "disable" class that had visible and not visible as argument . what it does it either move the layer out of the canvas (saving it's position to be back in place ) that way I don't deal with event handlers just x position. And if visible.. Then it does the child loop and disable the events.

Read the entire post on Facebook