Jump to content
Search Community

scrollAnimation.scrollTrigger.end is undefined

Leptitnouveau test
Moderator Tag

Recommended Posts

Hello,

I'm trying to create a portfolio with GSAP, but I am having some troubles here.

It says that the end property of mytimeline.scrollTrigger is undefined.
I suppose that it is because there's a problem with the end marker

 

Thanks in advance

I am not sure but maybe this screenshot can help (When I do not use the offsetHeight of my trigger element the end marker never reach the scroller-end marker):

image.thumb.png.e0f49e0a73b3da5deb12beee5114dfb7.png

 

See the Pen OJreEqb by Leptitnouveau (@Leptitnouveau) on CodePen

Link to comment
Share on other sites

Hi,

 

Where and how exactly are you using that?

 

For what I can see in your demo you only have this using an end point of a ScrollTrigger instance:

function labelToLevelUp(timeline, label) {
  let st = timeline.scrollTrigger;

  let val = st.start + (st.end - st.start) * (timeline.labels[label] / timeline.duration());
  return val;
}

Your demo is far from being minimal, so it'd help if you could reduce it as much as possible. Probably there is no need for all that HTML/CSS/JS, just add a few colored divs and your GSAP code in there to show the issue you're having.

 

Finally because of the way ScrollTrigger works internally, the properties might not be available immediately, but in that method you should be able to access them.

 

Happy Tweening!

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