Lelc Posted June 23, 2020 Share Posted June 23, 2020 Hello guys, I'm trying to use ScrollTrigger.batch with typescript, but I can't set the markers nor the triggers, when I try yo put the markers for instance it says: Argument of type '{ onEnter: (batch: Element[]) => Tween; markers: boolean; }' is not assignable to parameter of type 'ScrollTriggerBatchVars'. Object literal may only specify known properties, and 'markers' does not exist in type 'ScrollTriggerBatchVars'.ts(2345) my code so far: gsap.set(".work", { y: 100 }); ScrollTrigger.batch(".work", { onEnter: (batch) => gsap.to(batch, { opacity: 1, y: 0, stagger: { each: 0.15, grid: [1, 3] }, overwrite: true, }), markers: true, }); am I doing something wrong? Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 23, 2020 Share Posted June 23, 2020 Hey Lelc and welcome to the GreenSock forums. Markers is not a valid property of batch, so that's your issue. Otherwise you could have a ton of markers on the page and that's not helpful. 1 Link to comment Share on other sites More sharing options...
Lelc Posted June 23, 2020 Author Share Posted June 23, 2020 Ah ok, because I was trying the same code on codepen and there it worked fine, but it ended well at the end anyway, I just couldn't see the markers thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now