Share Posted July 28, 2022 (edited) Hey guys, I convinced (well, I didn't have to convince, just asked hah) my company to buy shockingly green package and started to playing around with some stuff. I have a horizontal, looping slider setup with scrollTrigger.observe and it works as I want it, except for one thing - dragging. I am using velocityY to speed up & reverse slider left/right (actually it updates timeScale of timeline based on velocityY) as you normally scroll down using scroll wheel. I add 'pointer' type to the observer but the problem is it only works on dragging up/down (velocityY). Is there any way to "switch" the velocityY for X just for pointer event? I was thinking to just create another observer, but I'm not sure if I can create more observers and it won't affect performance or create conflicts? Or will I have to use draggable (didn't try it yet so I'm not sure if I can wrap my head around it). I've been thinking about it for too long and my mind feels full of different ideas and I'm confused. The solution is probably right in front of me and it's easy, but I can't see it. I need a break I will appreciate any help, direction or suggestion. Thanks! EDIT: I actually made second observer just for pointer, it works and I think it doesn't affect performance, but I'm not sure if it's a good practice, so still would want to know. See the Pen qBoVXXx by thehaes (@thehaes) on CodePen Edited July 28, 2022 by thehaes Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now