Jump to content
Search Community

'Pin' not working properly with virtual-scroll / smooth-scrolling

Shehzad Asif test
Moderator Tag

Recommended Posts

Hy Zach

 

You are always available to help out at this amazing gsap forum, thumbs up for that. The more I am getting deep the more I am learning.

In my demo I am using "https://github.com/baptistebriel/smooth-scrollingbaptistebriel smooth scroll/ virtual scroll as mentioned in my question. I removed the CDN and placed the library into the code to avoid misunderstanding.

In your demo you are using another library not related to my demo. Can you please look into it again. Look forward to your reply.

 

Regards,

Shehzad Asif

Link to comment
Share on other sites

HY Zach

 

As far as CDN link of library related to your site, I took it from gsap forum while searching for the same issue. I always search on the forum or internet before posting the question here.

In your demo you are using the right library that I am using but smooth scroll is not working in your demo. If you change the class of "scroller" with "vs-section" respectively at all places then smooth scroll will work (just like my demo) but scroll trigger and pinning will not work. I hope this makes it clear. 

 

Regards,

Shehzad Asif

Link to comment
Share on other sites

  • 2 weeks later...

Hy There

 

If anyone already implemented or can implement the above mentioned smooth scroll library with scrolltrigger. Pls share here. I thinks it is the best library for smooth scroll purpose as it provides the perfect balance between regular smooth scroll like asscroll and locomotive. Demo section of the library can explain better what I am saying.

 

Or Zach as you are the master of GSAP. It would be awesome if you can do this from your busy schedule. 

I am also working on it but got stuck with pinning not working and animation triggers a bit before the target viewport. 

 

Regards,

Shehzad Asif

Link to comment
Share on other sites

  • 3 months later...

Hi Zach

 

With the help of this awesome library author we made the code workable with gsap. Now scroll trigger works as supposed to be, not in one area that we could not solve. Now the thing that is not working is the pin as of now. Can u pls look into this and help the pin working.

Below is the sandbox without pin just to show that it is working as supposed to work without pin but ASA I will use pin, it will not work properly.

 

https://codesandbox.io/s/dry-cherry-r6cgf?file=/index.html

 

Regards,

Shehzad Asif

 

Link to comment
Share on other sites

Currently you're not using the scroller property of ScrollTrigger that makes the ScrollTrigger use the scroller specified. So your scrollerProxy is not doing anything helpful. Either use the scroller property to specify the scroller and remove the ScrollTrigger.update() call from the smooth scroller callback (like this) or remove the .scrollerProxy() completely. The in-between that you have makes no sense.

 

As for the pinning question ultimately the responsibility is on you to get it working. We don't promise to support every single third party library. My guess is that you will need to do something like what we did with Locomotive Scroll in handling the pinning in a special way. But we don't really have the resources to investigate this for you for free.

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