Vahan0799 Posted June 4, 2022 Share Posted June 4, 2022 Hey everyone!😀 This is my first attempt on using Draggable. And I have a few problems here. Is there a way to increase the speed of dragged slide and decrease the speed of scrolling? With fast scroll they are flying instead of smooth slow scroll 😕 And I have absolutely no clue, is it possible to stop ScrollTrigger and Draggable on last Element? There is a white huge gap appears at the end based on window width 😕 And Happy Tweeining everyone, GSAP is AWESOME! ♥ See the Pen bGLjNdJ by VahahBio (@VahahBio) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted June 7, 2022 Share Posted June 7, 2022 That code was originally based on the assumption that the elements are the width of the viewport, but it looks like you're using it in a very different way so you'd need to adjust the logic. As for making the scroll faster, it's all about the distance which you'd control using the "end" value on the ScrollTrigger. It's using the offsetWidth of the scrollContainer right now, so here's a fork that uses 1/10th of that: See the Pen YzeOWQW?editors=0010 by GreenSock (@GreenSock) on CodePen You may need to adjust your CSS/markup to ensure there's enough to force scrolling. If you want the Draggable to go at a different speed, you'd need to adjust the logic in there. Most likely the ratio variable. These forums aren't so much for helping build out custom logic, but we're happy to answer any GSAP-specific questions. 👍 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now