Transcend Studios Posted October 2, 2024 Posted October 2, 2024 HI, I'm facing a problem with Observer. It perfectly works on every device except touch device. In a touch device, the observer starts from the opposite direction. If you visit my website (https://transcendstudios.asia/) from mobile, I hope you will get the issue. Also, you can check the example (CodePen) from mobile. onDown, slider should slide bottom to up and onUp slider shoud slide up to bottom. But in mobile it reversed. Thanks See the Pen abedXrr by pranto-gfx (@pranto-gfx) on CodePen.
GreenSock Posted October 2, 2024 Posted October 2, 2024 First of all, thanks for being a Club GSAP member, @Transcend Studios! 💚 If you want to make wheel scrolling go in a different direction than touch-scrolling, you can easily do that by using the wheelSpeed config property: wheelSpeed: -1 // opposite direction There's also a scrollSpeed property. So you should be able to get pretty much any behavior you want. 1
Transcend Studios Posted October 2, 2024 Author Posted October 2, 2024 Hi @GreenSock, Welcome, and thanks for the quick response. I have tried that wheelSpeed. But it couldn't solve my problem. Could you please see my example of what I actually do on my website? And if you kindly see this CodePen example from a mobile device, I hope you will find out that issue. See the Pen poMyzNw by pranto-gfx (@pranto-gfx) on CodePen. Thanks.
Solution GreenSock Posted October 4, 2024 Solution Posted October 4, 2024 @Transcend Studios Hm, I didn't see your attempt with wheelSpeed. Here's what I meant: See the Pen xxvVeLq?editors=0010 by GreenSock (@GreenSock) on CodePen. Notice I just set wheelSpeed: -1 and inverted the onUp and onDown callbacks. Is that what you were looking for? 2
Transcend Studios Posted October 4, 2024 Author Posted October 4, 2024 It's working. Thank you very much 🤍 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