Studio Gusto Posted January 8 Posted January 8 Hi all, in my project where I instantiate lenis in a container and not in the body as by default, when I resize the window it seems that scrolltrigger is unable to calculate the new start & end correctly, did I do something wrong in the scrollerProxy configuration? See the Pen QwLQyMw by friconelli (@friconelli) on CodePen.
Solution GreenSock Posted January 8 Solution Posted January 8 Thanks for being a Club GSAP member, @Studio Gusto Lenis isn't a GreenSock product so we can't really support it here (I'm pretty unfamiliar with it), but it looks like you neglected to properly handle setting the scrollTop in your proxy (you only handled getting): See the Pen OPLQbYm?editors=0010 by GreenSock (@GreenSock) on CodePen. Does that help? 2
aronanol Posted January 23 Posted January 23 Hi guys, thanks for this one, a huge help on a current project, got a question, it seems that Lenis with this setup dont detect touch scroll on mobile, so on my phone I am not able to scroll. ( on desktop everything work well ) If I test the codepen : See the Pen YPKJYgy by aronanol (@aronanol) on CodePen. with chrome mobile simulator, I cannot scroll with touch action trough the page Thanks
Rodrigo Posted January 23 Posted January 23 Hi, I just tested the debug version of the codepen demo you posted on an android phone (chrome/firefox) and an iPad (chrome/safari) and is working as expected. I wouldn't trust the results of chrome's mobile emulator especially on the preview of a codepen, since is not really a device and the codepen preview has some iframes in place that makes codepen works the way it does. Is always a better idea to try on real devices. Happy Tweening! 1
aronanol Posted January 23 Posted January 23 I got a css error, everything works like a charm. Thanks guys for this little gem!!! ❤️ 1
aronanol Posted January 23 Posted January 23 Got just a question @Rodrigo , is it a way to normalize the scroll while using a proxy ?
Rodrigo Posted January 23 Posted January 23 You can try normalizeScroll(), but I'm not sure how is going to work with Lenis though: https://gsap.com/docs/v3/Plugins/ScrollTrigger/static.normalizeScroll() 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now