Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
JonQuayle

Horizontal scroll with mouse using Draggable

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

 

Hey Max,

 

unfortunately I can not help you with this, since I myself don't have access to an Apple device atm - so no Safari for me.

 

Also, we don't really offer support on live websites in these forums. Your other problem was resolved by a quick glimpse at what ressources you are loading, but this really sounds like more of a layout related question and will probably take more than just a quick glimpse. 

 

I'd suggest opening a new thread with your question and adding a minimal demo on some platform like codepen.io, that gives others a good overview of your code and makes it possible for others to tinker with it - that will really boost your chances of getting a helpful answer.

 

  • Like 1
Link to comment
Share on other sites

On 5/27/2021 at 11:58 AM, akapowl said:

Hey @ferriss

 

You could use a proxy-element for the dragging part, just like this demo in the ScrollTrigger How-To Pens collection on codepen shows

 

I just quickly threw the JS in with your setup there to show it working. Hope this helps.

 

 

 

 

Hey @akapowl

 

With this approach, `intertia: true`, doesn't work? Is that right? 

Link to comment
Share on other sites

You need to add an onThrowUpdate callback. Use the same callback as your onDrag.

 

Draggable.create("", {
  ...
  onDrag: update,
  onThrowUpdate: update
})[0];

function update() {
  ...
}

 

  • Like 3
Link to comment
Share on other sites

@akapowl thanks for the tips. I will make a codepen as soon as I can and start a new thread

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