Jump to content
Search Community

GSAP SMOOTH SCROLL + SCROLLMAGIC Bug

Nolla test
Moderator Tag

Recommended Posts

Hey Nolla and welcome to the GreenSock forums. 

 

We don't recommend ScrollMagic. GSAP has its own official scroll plugin called ScrollTrigger that has way more features, a sleeker API, and a smaller file size! Its .scrollerProxy() method can help it be hooked up to smooth scrolling libraries with ease.

 

Give it a try! I'm sure you'll come to love it.

  • Like 2
Link to comment
Share on other sites

Hey @Nolla, I saw your private message, so I decided to answer on the forum because it may help others. 
I'm not aware of how you've handled your Smoothscroll, but I would say that your problem could it be related to callback timing.
Probably you're calling the smooth scroll before the browser get the correct size of the document. 
 

You maybe need to put some preloader on images and call the smooth scroll after browser get it done, or put fixed size for all your elements so, or (more complex) create a lazy load function on your images and recalculate your smooth scroll every time the browser changes the height.
 

Seizing the opportunity I also suggest you use ScrollTrigger instead of ScrollMagic, so much more benefits and better performance.

Good Luck.

  • Like 3
Link to comment
Share on other sites

Tentei algumas soluções mas como sou iniciante nada resolveu meu caro Victor

Poderia me ajudar da forma mais simples que você puder??

 

Grande Abraço

 

On 8/12/2020 at 8:37 PM, Victor Work said:

Hey @Nolla, I saw your private message, so I decided to answer on the forum because it may help others. 
I'm not aware of how you've handled your Smoothscroll, but I would say that your problem could it be related to callback timing.
Probably you're calling the smooth scroll before the browser get the correct size of the document. 
 

You maybe need to put some preloader on images and call the smooth scroll after browser get it done, or put fixed size for all your elements so, or (more complex) create a lazy load function on your images and recalculate your smooth scroll every time the browser changes the height.
 

Seizing the opportunity I also suggest you use ScrollTrigger instead of ScrollMagic, so much more benefits and better performance.

Good Luck.

 

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