Jump to content

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Joe Hakooz

Draggable isThrowing - undefined

Recommended Posts

Yep. Updated to latest version and it works. Thanks!

Link to post
Share on other sites

Spoke too soon. Looks like there's a possible bug. 


Using your codepen, throw the ball. Then click on the ball without dragging. Notice how it is returning true for each of the properties. Eventually it stops doing that, but I'm not sure how, when, or why. 


Is this a bug? The reason it matters is because I'm trying to allow a "mouseup" event ONLY when the draggable is not dragging or throwing. 



Link to post
Share on other sites

i see... , but that's not a bug ! :)


in fact with  ' x,y ' we use subpixels not pixels and when you click without any drag that snap to nearest pixel , pls add something like this to your draggable creation to snap pixel perfect position on throwComplete :

  x: function(endValue) { return endValue.toFixed(0) },
  y: function(endValue) { return endValue.toFixed(0) }

See the Pen yNvEgY by MAW (@MAW) on CodePen


  • Like 1
Link to post
Share on other sites



Works great in your demo but in my actual project, throwing now gives a funky rubber band feel.

My actual implementation is more complex than a single ball. I'm using a bunch of "cards" that dynamically move around to create infinite scrolling. 


I'll need to play around a bit on my end and see what I get. 

Thanks for your help!

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.