Jump to content
GreenSock

RJWadley

fromTo not reverting inline styles as expected

Recommended Posts

It seems like fromTo tweens aren't always reverting in the way I would expect. If I use a from or a to tween, the inline styles set by gsap are removed. However, with a fromTo tween, the element is reset to the beginning of the tween and the inline styles are not reset.

 

For example, in the codepen provided I would expect the box to return to the top left when reverted, but it just returns to the beginning of the tween.

 

Am I missing something or is this a bug?
 

See the Pen ExLoMaK by RJWadley (@RJWadley) on CodePen

Link to comment
Share on other sites

  • RJWadley changed the title to fromTo not reverting inline styles as expected

Very sorry about that, @RJWadley. There was a regression in 3.11.2 that should be resolved in the upcoming release which you can preview at 

https://assets.codepen.io/16327/gsap-latest-beta.min.js

 

See the Pen eYrywvp by GreenSock (@GreenSock) on CodePen

 

(You may need to clear your cache to see that working)

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