Jump to content
Search Community

TweenMax.staggerTo doesn't work correctly in safari

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

Hi and welcome to the GreenSock forums,

 

Thanks for the demo. Very helpful.

 

if you set your animation duration to 20 seconds and inspect the svg in Safari's developer tools you will see that that GSAP is animating the strokeDashOffset inline style just fine. Seems Safari is just rendering those changes differently than Chrome. There doesn't seem to be anything wrong with TweenMax.staggerTo().

 

I'm not exactly sure why safari is rendering differntly. Perhaps you need to set up your stroke-dasharray="350px" stroke-dashoffset="-350px" values differently at the start for Safari. 

 

Our DrawSVGPlugin has a bunch of code built in to avoid these types of browser bugs and inconsistencies. This version should work fine in all browsers:

http://codepen.io/anon/pen/gwZpKj?editors=1010

 

Notice I didn't have to set stroke-dasharray="350px" stroke-dashoffset="-350px" anywhere. The plugin knows which values to use.

 

You can learn more about DrawSVG here: http://greensock.com/drawSVG

 

DrawSVG is available to Club GreenSock members: http://greensock.com/club/

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

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