Jump to content
Search Community

ScrollTrigger.refresh() Resets Improperly

quintonch test
Moderator Tag

Recommended Posts

Hello,

 

I'm a bit new to GSAP.

 

We've got an interesting issue here. We are doing an uncover/reveal effect on our footer, but the height of the page might dynamically change. For example (in the codepend), when selecting another project category that has a smaller amount of projects, the page will shrink or grow. With this, we need the footer to maintain its reveal effect.

 

In the first image you can clearly see what the footer should look like. However, when selecting a different category on our page, the footer then looks like this. Even after calling ScrollTrigger.refresh()

 

Is there anything obvious that I am doing wrong here?

 

385652242_ScreenShot2021-01-12at10_28_44AM.thumb.png.ef9842afab08344e0b33ba97d5c98785.png

 

1353469931_ScreenShot2021-01-12at10_29_04AM.thumb.png.659a817dbefce55c800f8fdc1378d5f1.png

See the Pen XWjxpPd by quinton_c (@quinton_c) on CodePen

Link to comment
Share on other sites

Hey quintonch and welcome to the GreenSock forums. You've got a lot of things going on in that pen and it doesn't actually recreate your issue. Can you please strip out everything that is not directly related to your issue and make sure that the demo recreates the issue that you're having? That will greatly help us help you. The post about making a demo can provide more info.

Link to comment
Share on other sites

Just now, ZachSaucier said:

Hey quintonch and welcome to the GreenSock forums. You've got a lot of things going on in that pen and it doesn't actually recreate your issue. Can you please strip out everything that is not directly related to your issue and make sure that the demo recreates the issue that you're having? That will greatly help us help you. The post about making a demo can provide more info.

 

Hey Zach.

 

Sure, I can give it a shot (minimizing the codepen).

 

I wasn't sure if I should copy the entire page source over or if I should make a minimal repro. In the meantime, you're welcome to check out the issue here (while I work on making the repro smaller). If you are looking at the page, you can see the issue when clicking on either of the text buttons under 'Anything You Need', e.g. 'Production' or 'Animation.'

 

Thanks for the super quick response!

Link to comment
Share on other sites

Hey @ZachSaucier,

 

I've just updated the codepen with minimal code in hops that it is minimal enough for you to see what is happening clearly.

 

If not, just scroll down to the titles that say Videography, Production, Animation. Click on one that is not active, and scroll to the footer and you will see that the reveal on the footer is not uniform each time. It reveals at a different height each time.

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