ariwoot Posted March 8, 2022 Share Posted March 8, 2022 Hello, i need to listen if the scrolltrigger is scrolling, hence if its timeline is animating or not. I thought of using the ScrollTrigger.isScrolling() method, but I realized that it doesn't consider the scrub delay, so it goes back to false before the actual end of the scroll action / animation. Do you know if there's a way to get that info, considering also the scrub property? Thank you in advance!! Link to comment Share on other sites More sharing options...
elegantseagulls Posted March 8, 2022 Share Posted March 8, 2022 2 hours ago, ariwoot said: Do you know if there's a way to get that info, considering also the scrub property? I'd imagine you could set a timeout on your .isScrolling() that's the same duration as your scrub value. 2 Link to comment Share on other sites More sharing options...
GreenSock Posted March 9, 2022 Share Posted March 9, 2022 Yeah, that's not really a bug/problem because that method is supposed to report on if the page is actually scrolling (which is different than if there's an animation being scrubbed). There's an onScrubComplete callback that you can tap into. 2 Link to comment Share on other sites More sharing options...
ariwoot Posted March 10, 2022 Author Share Posted March 10, 2022 13 hours ago, GreenSock said: Yeah, that's not really a bug/problem because that method is supposed to report on if the page is actually scrolling (which is different than if there's an animation being scrubbed). There's an onScrubComplete callback that you can tap into. that's exactly what I was looking for! Thank you! 1 Link to comment Share on other sites More sharing options...
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