Hello, I have the very similar setup (Gatsby, ScrollTrigger and smooth-scrollbar) but the given solution doesnt work for me - I can see scroller-start and scroller-end markers following the scrolled screen but not the markers of the animated element. I can see markers of the animated element only if I add scroller property to it but then scroller-start and scroller-end dont follow the screen.
Also I tried to make some console.logs inside this scrollTop function but it looks like it doesn't work too.
useEffect(() => {
const bodyScrollBar = Scrollbar.init(box.current)
ScrollTrigger.scrollerProxy("body", {
scrollTop(value) {
if (arguments.length) {
bodyScrollBar.scrollTop = value
}
console.log('test')
return bodyScrollBar.scrollTop
},
})
bodyScrollBar.addListener(ScrollTrigger.update)
}, [])
What could be my problem? @andsavu Would you like to share your code that is working for you? Thanks in advance