Hi, I am working on the NuxtJS GSAP application and using ScrollTrigger to animate elements based on the scrolled position.
First of all, I am amazing how great this plugin works, but I have a question regading the actions.
So, as mentioned in the documentation, using onLeave fires at the end of the animation, which is exactly what I need, since when the scrollTrigger animation is done, I want to call another function. The issue I have is that the onLeave fires every time the scrollTrigger is done (In case user scrolls up and then scrolls down) and what I need is to fire this additional function only once, the first time scrollTrigger animation is done.
Is there a way of doing it once?
onLeave: () => this.functionName(),