Jump to content
GreenSock

HaunGo

Safari (webkit) rotation problem (with DrawSVG plugin ?)

Recommended Posts

Hello.. I searched the forums for this, but didn't find anything.. .. I suspect is a known issue though.

 

I'm working with SVG, trying to rotate (among other things) and it's not holding the rotation.. It DOES tween/animate, but it snaps back to the original position when not animating.

 

I think it's related to the DrawSVG plugin.

 

Here's a codepen:   (be sure to compare Chrome/Firefox/Safari)

See the Pen BNWQmq?editors=101%C2%A0 by HaunGO (@HaunGO) on CodePen

 

 

Thanks in advance, 

See the Pen BNWQmq?editors=101 by HaunGO (@HaunGO) on CodePen

Link to comment
Share on other sites

Thanks for the demo, it was very helpful.

 

Yes, there seems to be a problem in Safari.

 

After some poking around I found that setting rotation:90 to rotation:89 (or 91) in the first set() seems to work.

 

http://codepen.io/anon/pen/zGZPaR

 

We will have to investigate this further. We will let you know when we have a fix. Sorry for the hassle.

  • Like 2
Link to comment
Share on other sites

Hey thanks for the simple, temporary, fix!    I can definitely live with the 1 degree rotational difference..   I implemented it into my full project, and it DOES work.  

 

Great!

  • Like 1
Link to comment
Share on other sites

This is definitely a browser bug, and probably not one that GSAP can work around (as far as I can tell). Here's proof: 

http://codepen.io/anon/pen/KpWoqz

 

Hopefully Safari will fix things in the next release. In the mean time, you can just avoid rotating to exactly 90 degrees. Even 89.99 is fine. Of course we could browser-sense and then prevent landing on exactly 90 degrees internally, but that just feels really gross and could cause other problems, like if you wrote conditional code that depended on things being exactly 90 degrees - that change would make it impossible. See what I mean? 

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