Jump to content
Search Community

Draggable ScrollTop overbounce

momothemonster

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

momothemonster
Posted

First off - loving Draggable! Thanks so much.

 

I have an issue that may just be a misunderstanding of how things should work.

 

JSFiddle

 

In this example, if I'm scrolled most of the way to the top and I flick the draggable down, I'll scroll up and then rubber-band back down quite a ways. I'd like it to stop at the first element - ie forget the inertia once it hits the top so you can always flick your way all the way to the top.

 

Is the bounce-back displayed here the proper behavior? Am I applying resistances incorrectly?

momothemonster
Posted

Much better! That's totally on me and my use of the absolute value of the offset instead of the inverse. Thank you.

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