Jump to content
Search Community

issue with pinSpacing ?

sybilrondeau test
Moderator Tag

Recommended Posts

Hi. I have an issue that appears only when I try to resize the nav : the whole portfolio div falls eventually on the contact div. If I refresh, everything goes to normal. I tried with pinSpacing: false and manually add some space under the portfolio div but the issue remains the same. What did I do wrong ? I spotted the same behavior on a tutorial online using pin: true. https://www.williamrchase.com/post/scrollytelling-with-gsap-scrolltrigger/

Screen Shot 2020-06-19 at 14.20.06.png

See the Pen QWyjRzr by sybilrondeau (@sybilrondeau) on CodePen

Link to comment
Share on other sites

2 hours ago, sybilrondeau said:

I understand ! When I updated gsap I just did npm install .gsap-bonus.tgz again (the new one), is it ok ?

As long as you downloaded a fresh copy (3.3.4), sure. Maybe you should console.log(gsap.version) just to make sure. You could also uninstall everything GSAP-related and then do your npm install ./gsap-bonus.tgz again.

  • Like 1
Link to comment
Share on other sites

So I updated codepen with exactly what I have in my local project, and I think what's wrong is the media query I put in my JS with matchMedia... because now I can see the issue in codepen when I resize the screen. What's wrong ? How can I do if I want this script to apply only when the screen is 900px and more ? And not only on refresh ? 

Link to comment
Share on other sites

We're experimenting with a new API that'll make this sort of thing easier. Here's a fork of your demo with that in place (and a bunch of notes): 

See the Pen 4d16e4b18b257e7299af27ee91f23c4d?editors=0010 by GreenSock (@GreenSock) on CodePen

 

It uses a prerelease/experimental version of ScrollTrigger. 

 

Does that work well for you? 

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

  • 3 weeks later...

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