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

What is Framer? Join the Community
Return to index
Alvaro Lourenço
Posted Apr 07 - Read on Facebook

Listen to Animation events while ignoring Mouse/Touch events.
- Is it possible?

5 Comments

Ian McClure

Yup. onAnimation, onAnimationStart or onAnimationEnd.

Alvaro Lourenço

Yes but these commands toggles 'ignoreEvents' back to false. And then unwanted events starts being captured again.

Ian McClure

You can do Layer.off Events.Tap which is destructive to the event listener.
The better way might be to set a flag to ignore the code within the touch/mouse event when it triggers.

Flag = true

Layer.onTap ->
If Flag is true
//Do stuff

Alvaro Lourenço

Yeah, makes sense. The issue is that I'm subclassing and overriding mouse behaviors until some animation behaviors happen. So I can't 'off' the event for their signature method is out of scope, neither I would want to do so, as I want them to work after the animation happens.

Ian McClure

Can you post some code so I can see what is going on?

Read the entire post on Facebook