Jump to content
GreenSock

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

Momentum Based Range Input with Draggable

Go to solution Solved by GreenSock,

Recommended Posts

4 hours ago, jh3y said:

If I were to put another element such as a custom drag handle, and use Draggable for that bound to the input like I had originally, it would update the value and the Inertia would be triggered too, right? I think that's correct. I may have not worded it right but I'm pretty sure that works too, haha.

I'm not entirely sure what you mean by "...it would update the value and inertia would be triggered too..." but you could definitely use Draggable on a custom handle and just update the input.value in the onDrag, for example. And yes, you could have it track the inertia/velocity of the custom handle and do almost exactly the same thing we're doing in the simplified example, but you'd be animating the handle instead and then in the modifier you could apply the new value to the input.value. 

 

Does that answer your question? 

  • Like 1
Link to comment
Share on other sites

On 4/2/2022 at 10:19 PM, GreenSock said:

I'm not entirely sure what you mean by "...it would update the value and inertia would be triggered too..." but you could definitely use Draggable on a custom handle and just update the input.value in the onDrag, for example. And yes, you could have it track the inertia/velocity of the custom handle and do almost exactly the same thing we're doing in the simplified example, but you'd be animating the handle instead and then in the modifier you could apply the new value to the input.value. 

 

Does that answer your question? 

Yeah, I _think_ we mean the same thing 😅

 

My terminology may be slightly off but I'm pretty sure we are on the same frequency there

 

Thanks Jack!

 

             
ʕ •ᴥ•ʔ/

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