Archetype Posted November 3, 2021 Share Posted November 3, 2021 Hi there I'm trying to create a page which can be scrolled horizontally and by dragging too. I've set this up and it seems to be working however after I drag the page and try to scroll it doesn't scroll from the last drag position, it scrolls from the last scroll position. How do I update the ScrollTrigger so that it scrolls from the last drag position? It does work the other way around. Also I'm assuming that I have to dynamically set the bounds width so you can't drag the page outside the area? See the Pen dyzJpLr by umarsheikh13 (@umarsheikh13) on CodePen Link to comment Share on other sites More sharing options...
Solution akapowl Posted November 3, 2021 Solution Share Posted November 3, 2021 Welcome to the forums @Archetype There is a demo in GreenSock's ScrollTrigger How-To-Collection over on codepen that shows how to achieve that with the use of a proxy element. Maybe that'll help. See the Pen ZELQqeJ by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
Archetype Posted November 3, 2021 Author Share Posted November 3, 2021 @akapowl thanks so much, this is exactly what I was looking for, really appreciate it. 2 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