Jump to content
Search Community

GSAP Draggable not correctly using bounds

Tony Geek test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Hi, I'm new to the GSAP Draggable Plugin. I'm attempting to create a simple horizontal draggable element to act like a games library.

However, I can't seem to get the draggable container to correctly use the boundaries of the container. I've gotten this as close as I can to functioning in terms of keeping the dragged position, as that seems to have been glitching majorly for me. I've spun that up onto a codepen so you can see what I mean.

 

I just want to know how I can have a horizontal draggable container that:

  • Respects the boundaries set by it's container.
  • Maintains it's position after the drag is let go.

 

 

Help much appreciated in advance!

See the Pen gOqGpar by tonycre8-the-bold (@tonycre8-the-bold) on CodePen

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