Jump to content
Search Community

Scrolltrigger.isScrolling() doesn't consider scrub

ariwoot test
Moderator Tag

Recommended Posts

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

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!

  • Like 1
Link to comment
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...