Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
andyhullinger

simple rotation values for SVG behave oddly in chrome vs safari, firefox?

Go to solution Solved by GreenSock,

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

Rigging a puppet and attempting to reuse elements for legs and arms. Everything but the "hand" and "foot" work as expected across browsers. If I set simple (positive and negative) degree values for rotation in Chrome it works as expected, but in Safarit and Firefox the two "cloned" limbs are positioned differently?

See the Pen LNQbXM by andyhullinger (@andyhullinger) on CodePen

Link to comment
Share on other sites

  • Solution

Yep, as far as I can tell that's not really a GSAP issue as much as it's a browser quirk that I don't think we can possibly work around. Basically, using the <use> element is a bit dangerous for animation. Let's say you "use" an element that has transforms applied to it - some browsers think those transforms should flow through to the clones whereas some don't. I'm not sure which is technically "correct" (valid arguments could be made on either side). My suggestion would be to (oddly enough) not "use" the "use" element for animation like this. Instead, just build your SVG normally (sans <use>), as it'll be more pure and it'll avoid those browser inconsistencies. 

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