Jump to content
Search Community

clearProps for all TimelineMax

amihanya test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hm, I'm not sure I understand your goal here - it's very uncommon for someone to want to clearProps on every child tween inside of a timeline. If your goal is to simply revert the properties to where they were when the timeline started and kill it, you can do: 

 

yourTimeline.seek(0).kill(); 

 

Are you trying to literally remove all the inline styles of every target that was animated? If so, it'd probably be simplest to just use document.querySelectorAll() and loop through the results setting style.cssText = "". 

 

Does that help? If you're still struggling, it'd be very helpful if you could provide a little context and the "why" behind your request. A codepen demo would be even better :)

  • Like 3
Link to comment
Share on other sites

Thanks for the answer.

I build a software that let you load the JS file that AbodeAnimate create and make all the animation with GreenSock. you drag the items and add the properties.

i want to let the user option to play the timeline every time. but after 1 or 2 time if the user click on the player the time line calculate from the currect params and not from the orginal params.

little screenshot for example:

Recording_173.gif

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