Jump to content

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

Draggable - disabling toss

Recommended Posts

I am incorporating some basic draggable functionality into a web banner and was wondering if there was an easy way to disable the "toss" ability. I have some text that is animating based on user interaction and i was hoping there was an easy way to just turn this ability off. 


I can refactor my work into a pen if that makes it easier but i thought it might not be necessary. 


Thanks in advance!

Link to post
Share on other sites

You actually have to opt-in to the "toss" behavior, and you even need a bonus plugin to do it :)


I'm not sure which version you're using, but just make sure that you DON'T have throwProps: true or inertia: true

  • Like 1
Link to post
Share on other sites

OK, i tried to make sure that these properties were false but am still getting the throw to work. I've imbedded my pen so you can see what i am referring to. 


See the Pen VwexVbd by beeboyely (@beeboyely) on CodePen

Link to post
Share on other sites

Interesting. Whoever made that script uses some weird drag handling function (that causes conflict). Applying it to the onDragEnd instead works a lot better:

// onDrag: onDrag,
onDragEnd: onDrag,


Link to post
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.