Jump to content
Search Community

Changing draggable direction mid-drag?

green_machine 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

Am going to be working on a project with a slider that looks and functions similar to a car's manual transmission, where the slider is able to be dragged in an |--|--| formation. So, you'd be able to drag the slider left and right along the middle x-axis, and when it reaches one of the junctions, draggable up and down along the y-axises. 

 

I haven't used the Draggable plugin much, so before I spend time trial-and-error-ing possible solutions, I was curious if:

  1. This is easy to accomplish with the Draggable plugin. The examples on the Draggable page show that it's easy to make an object draggable along the x-axis, y-axis, or both axises, but is it possible to change that property seamlessly mid-drag?
  2. If not, how would you approach creating something like this?
  3. Are any CodePen examples that exist already so I can get ideas on how to structure it? 

 

Thank you to anyone that can provide some info!

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