Jump to content
Search Community

anticipatePin in reverse

Grene test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Quick, general question about ScrollTrigger: Does anticipatePin work the same scrolling up as it does scrolling down?

 

I ask because I noticed a difference when pinning large panels. Without ancitipatePin, onEnter has a small delay; however it feels relatively smooth when setting anticipatePin to 0.5. The delay seems to persists onEnterBack, though.

 

Video for reference: https://streamable.com/yew6qx

 

I'll happily provide a demo if this isn't expected behavior.

  • Like 1
Link to comment
Share on other sites

hi @Grene  usually it happens cuz of the browser, I get the same issue with Safari every time but usually, I use anticipatePin: 1  along with ScrollTrigger.normalizeScroll(true)  and it fixes it 

 

so try to add both of them and create a demo if this didn't work for you so we can test it and find a way around it 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Toso said:

hi @Grene  usually it happens cuz of the browser, I get the same issue with Safari every time but usually, I use anticipatePin: 1  along with ScrollTrigger.normalizeScroll(true)  and it fixes it 

 

so try to add both of them and create a demo if this didn't work for you so we can test it and find a way around it 

Good tip, thank you!

6 hours ago, GreenSock said:

That's a good catch, @Grene. When checking the code, it does anticipate in the down direction, not up. That should be resolved in the next release which you can preview at https://assets.codepen.io/16327/ScrollTrigger.min.js (you may need to clear your cache). 

 

Better? 

Wonderful, that looks to have smoothened things up! I'll be sure to update once the next release is out. Thank you!

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...