Jump to content
Search Community

Stagger firing multiple times after drag event fires

JamesGrubb test
Moderator Tag

Recommended Posts

Hello,. I'mm using gsap to animate some svg paths. My code uses  Swiper.js to create a carousel. Swiper has a helper method 'slideChange' that fires on every swipe. When I'm using a fromTo animation but the stagger seems to fire multiple time? I tried adding the stagger to the first object in the fromTo function but that did not help. Also  repeatRefresh: true did not help. Any thoughts would be appreciated. James.

See the Pen RwQzEvv by limitedunlimited (@limitedunlimited) on CodePen

Link to comment
Share on other sites

That's because you keep adding new sequenced timelines to the main timeline over and over and over again and then you're trying to play it from the beginning. 

 

I'm not really sure what your goal is there, but I think you could just get rid of the main timeline and use one: 

See the Pen oNEKzyE?editors=0010 by GreenSock (@GreenSock) on CodePen

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...