Jump to content
Search Community

Drag and Horizontal Scroll

Archetype test
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

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

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