Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Edify Technologies

Timeline progress not returning to 0

Recommended Posts

Checkout the codepen. If you use the buttons to set timeline progress(), you can go back and forth between 0 and 0.5 no problem, but as soon as you go to 1, you can't get back to 0. I've experimented with other values as well, and everything seems to work until you go to 1 for the first time. After that, when you try and return to 0 it reevaluates to 1.

 

Does this look like a bug, or do I have my logic wrong? Thanks!

See the Pen GRgJPdV by sallf (@sallf) on CodePen

  • Like 1
Link to comment
Share on other sites

Yes indeed, good catch (though about 5 hours too late - we just pushed 3.0.2 out) :)

 

It had to do with a complexity related to repeating animations - if you think about it, when the playhead is at the VERY end of the animation, that's the same spot as the very BEGINNING of the next iteration. So this would only happen when you have a repeating tween and you set progress() to 1 and then 0. Glad you found that! It should be fixed in the next release which you can preview at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js

  • Like 3
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.
×