Closed GabGee closed 4 years ago
First thing I'd recommend, don't modify the scrollbar. I went down this rabbit hole once. It's just not worth it at all. In order to modify the scrollbar/scrolling all plugins have to hack up the body and create new layers in the dom. Stick with the native scrollbar.
Beyond that, the new scrollbar divs injected into the dom are likely screwing with the divs that ScrollMagic injects into the dom when you do pinning. I didn't make ScrollMagic, so I can't help you there. I just made a plugin to make ScrollMagic be a bit easier to use in a modern environment.
Btw, that scrollbar plugin demo is extremely laggy on my machine, and my machine isn't low-end. If you absolutely have to, I'd recommend trying https://kingsora.github.io/OverlayScrollbars/#!overview - but again, I'm completely against modifying the scrollbar. It's 100% not worth the cross browsers issues and getting it to work with other code (the problem you're having now). I'd only using it on scrollable divs within a page, not the page itself.
I tried to integrate scrollScene with Smooth Scrollbar plugin and it looks like it works out of the box in some way, I don't know how.. but I just had to init the Smoth scroll plugin. Bad side is that performance are slow/choppy and "pins" are not working, i also see the indicators float in the screen with some kind of delay while I scroll.. so it's not working as aspected.. I cannot find in the documentation how to pass custom scroll values.. Any ideas/advices?