Jump to content
Search Community

Vertical then horizontal with drag then vertical again breaks at the end but only when vertical is enabled

furley
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Posted

Hi, I am having an issue with vertical and horizontal scrolltrigger, it works great without setting up the drag I have commented in the js on codepen the problem area, it seems to nearly duplicate the width when I turn drag on. I tried fixing this by dividing by the number of slides and it fixed it but I'm still not really sure why.

Then at the end, it jumps from the slide if you comment out the bit then uncomment it shows the difference any idea how to fix this?

Any help would be greatly appreciated!!

Thanks in advance

See the Pen ExGqBpB by Steve-Furley (@Steve-Furley) on CodePen.

  • Solution
Posted

Hi,

 

The issue is happening regardless of the Draggable instance. I think this might be related to your HTML/CSS setup more than a GSAP/ScrollTrigger/Draggable problem.

 

Here is a simpler setup that seems to work OK:

See the Pen PoVYWJb by GreenSock (@GreenSock) on CodePen.

 

However I would definitely study this example (no need for the container animation and ScrollSmoother) and see how it gets done with Observer:

See the Pen NWMxRvM by GreenSock (@GreenSock) on CodePen.

 

Hopefully this helps.

Happy Tweening!

  • 2 weeks later...
Posted

Perfect thanks for your help that worked perfectly!!!!

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