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

What is Framer? Join the Community
Return to index
Dae Hyuk Yoon
Posted Dec 30 - Read on Facebook

Is there an easy way to disable an event listener if a layer's opacity is set to 0?

7 Comments

Jordan Robert Dobson

layer.ignoreEvents = true

Dae Hyuk Yoon

I've try that and it doesn't work.

Jordan Robert Dobson

So the record button ignores events when the replay button opacity is 0.

What are you expecting to happen?

Dae Hyuk Yoon

When ReplayButton is clicked, I want it's opacity to be 0 while not firing any RecordingButton events(which is placed on top of Replaybutton)

Andrew Nalband

RecordingButton.off()

Andrew Nalband

RecordingButton.ignoreEvents = true should work too - if you're still having trouble, please share your project so we can help.

Dae Hyuk Yoon

Thanks Andrew Nalband, I figured out the issue. The ReplayButton was never tapped because the RecordingButton was sitting on top of it with 0 opacity.

Read the entire post on Facebook