Jump to content
GreenSock

vsimak

codepen - can't make scrollerProxy ScrollTrigger work with Smooth-scrollbar

Go to solution Solved by vsimak,

Recommended Posts

  • Solution

Hi there,
48hrs later, 3rd day of trying -- all google result links are blue now && gsap forum threads.
I know the code by heart every line now (at least I feel like it).
I am missing something ridiculously obvious.

ScrollTrigger works without SmoothScroll, and vica versa.
Its either ScrollerProxy -- something that I am not doing right.
Or its the CSS of the containers.....

The worst bit, I've made this work before... 6months ago, using loco, and in production.
But now... I really don't know why....
By all accounts it SHOULD work!
Heres a quick codesandbox. 


In scroller.js is the main setup.

https://codesandbox.io/s/affectionate-leakey-8697k?file=/pages/index.tsx


Thank so you much senpai

 

 

answer

 

so the codesandbox works straight up -- and I can't recreate the complexity of the source code atm, so I will keep on digging.

Link to comment
Share on other sites

  • vsimak changed the title to codepen - can't make scrollerProxy ScrollTrigger work with Smooth-scrollbar

Hey @vsimak

 

Since you said your codesandbox works straight up, the problems you encountered will likely not be related to that, but I noticed you were having an onStart-callback on that ScrollTrigger in there. While tweens and timelines do have those, ScrollTriggers do not - maybe you were going for onEnter there?

 

As I said, it might very well not be the cause of your problems - just wanted to make sure :) 

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