Jump to content
Search Community

TimelineLite - callbacks added at the very end occasionally fire twice?

regan test
Moderator Tag

Recommended Posts

Hi everyone!

 

I have been using GSAP flawlessly for my personal projects quite a while now. Recently, I found strange behavior of the TimelineLite class.

 

Sometimes, when I add callback at the end of the timeline it occasionally fires twice. I have been trying to solve this for a whole day now and I am starting to believe this must be some sort of a bug in TimelineLite class. I found out, looking at the stack trace, that whenever this redundant calls happens, the callback gets called in the forceChildrenToEnd method, but the same callback has already been called in its regular callback time.

 

Has somebody experienced this? Maybe there is some kind of workaround to make sure my callbacks won't fire twice (disable forceChildrenToEnd?) ?

 

Thanks,

Jan

Link to comment
Share on other sites

Have you tried v12? A lot of work went into better handling zero-duration tweens (which is what a callback is) on timelines. It's much more tricky than you might expect to accommodate this sort of situation (especially at the beginning or end of a timeline). http://www.greensock.com/v12/

 

If you need v11, might I suggest placing your callback 0.001 seconds before the end maybe rather than exactly at the end?

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...