Jump to content
Search Community

Snap problem on throwUpdate

Gas 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

Hi there !


I have a problem with draggable, I have a carousel that works with draggable and I want to snap images on the center of the screen when I release the carousel.
What I have works perfectly on drag event but as soon as I throw it, the onThrowUpdate is launched directly after I release click and doesn't snap my carousel right.
Is there a way to force snap the my drag element when this one is about to stop ? 

Thanks !

 

Link to comment
Share on other sites

Welcome to the forums, @Gas. It's very difficult to troubleshoot blind - do you have a reduced test case, perhaps in codepen? 

 

Do you have different logic in an onThrowUpdate that's interfering? If so, why do you have an onThrowUpdate at all? I guess I just don't understand what you're describing or why it'd be set up that way. An onThrowUpdate should fire after the release of a drag, so it sounds like it's working properly. I'm sure we'll have more insight once you provide a reduced test case (it can even be a single <div>...the simpler the better). 

 

If you're not sure how to create a codepen demo, please see 

 

 

  • Like 1
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...