Jump to content
Search Community

HatakeK

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

HatakeK's Achievements

1

Reputation

  1. HatakeK

    Snap rotation

    Found a decent solution I think -- I wrongly presumed that the tween TweenMax.to('id', 1, {rotation: 360, repeat: -1}) would continue to increase the rotation beyond 360. Since it doesn't, I can simply do this on mouseleave: TweenMax.to('id', 0.5, {rotation: 0}) Thanks anyway PS -- I'm absolutely in love with GSAP!!
  2. HatakeK

    Snap rotation

    I'm rotating an svg on mouseenter, and currently just reversing the rotation with .reverse(1) on mouseleave. What I'd like to do on mouseleave is to tween the rotation counter-clockwise back to the starting point -- i.e. rotation % 360 == 0. E.g. if rotation is 780 when mouseleave, it should rotate back to 720. I couldn't find a way to do this "natively", so I tried getting the current rotation of the svg when mouseleave event fires, but I can't seem to get this value. I read in the SVG-tips that Is there another way to get the current rotation or a simpler way to do this rotation snap?
×
×
  • Create New...