Jump to content

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

SVG changing rotation speed on mouse hover

Recommended Posts

I am trying to animate a rotating SVG, but I have two issues:

  • on mouseEnter sometimes the animation "jumps"
  • when I try to mouseEnter/mouseLeave several times, the animation get slower/faster and sometimes it stops completely

I am not sure if this issue is due to the fact that I am not using a timeline, but I cannot use it easily because I have a complex animation. Is there a solution without using a timeline?

See the Pen YqbBqZ by microcipcip (@microcipcip) on CodePen

Link to comment
Share on other sites

You're telling it to go to 360 degrees when it should be to add 360 degrees.

directionalRotation: "+=360_cw"
  • 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.