Jump to content
Search Community

Rotation draggable knob

zozo 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

 

I wasn't exactly sure what you are asking but if you want to have an element that you want to drag (up and down) and also rotate please consult the demo below from our friend @Diaco

 

I had to fork his original to add an updated version of GSAP and set allowEventDefault:true (to allow the mousedown events).

 

The basic idea is that you have 2 Draggable instances and you toggle their enabled state

 

See the Pen LBmLbr by GreenSock (@GreenSock) on CodePen

 

In the future its best to write actual JS (as opposed to coffeescript) so that more people can make sense of what you are trying to do.

 

 

  • Like 3
Link to comment
Share on other sites

Hi Thanks, it seem I didn't explained myself clearly.  I corrected the pen to make it more clear, and in plain js. 

What I want is the knob to rotate continuously, that's easy. 

Then I want to make the knob draggable, easy too.  

Finally I want that when we release the knob, it resume the rotation, from where we left the knob. Not easy :)

Thanks ! 

 

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