Jump to content
Search Community

Marquee Endless Loop Not Working

Deallie_Digital test
Moderator Tag

Recommended Posts

Hello All

I'm trying to make and endless loop with two rows going in opposite directions. The first row works fine, but the second row has a bug where there is a gap of unrendered elements after Infatuation. Any ideas on what's going on?

 

Code is Below (Apologies, but I have issues making react Code Pens):

https://codesandbox.io/s/test-carousel-forked-s5wtub

See the Pen bGLpKwX by bubbajaydee (@bubbajaydee) on CodePen

Link to comment
Share on other sites

Your demo seems to be totally non-functional (errors are being thrown that are unrelated to GSAP, so nothing is even showing). That makes it almost impossible to troubleshoot. 

 

I'd recommend just stripping everything out including React if you can - just get the basic concepts going with some colored <div> elements and post back here with any GSAP-related questions. Just please keep in mind the forum guidelines - we're happy to answer GSAP-specific questions but we can't provide free general consulting about logic issues, 3rd party libraries, etc. 

 

Also, there's a helper function in the docs that may prove useful for endlessly looping things on the x-axis. https://greensock.com/docs/v3/HelperFunctions#loop

  • Like 1
Link to comment
Share on other sites

Thanks for the quick reply. Apologies, my CodeSandBox has been acting super buggy lately, so below is a scaled down example in Codepen. To clarify, I have a Carousel infinite loop component that can go left or right based on the props passed. The carousel going right works fine, but for some reason the carousel going left has a gap of unrendered divs after the last div.

 

updated code:

Link to comment
Share on other sites

  • 1 year later...
On 5/10/2022 at 8:38 AM, GreenSock said:

Your demo seems to be totally non-functional (errors are being thrown that are unrelated to GSAP, so nothing is even showing). That makes it almost impossible to troubleshoot. 

 

I'd recommend just stripping everything out including React if you can - just get the basic concepts going with some colored <div> elements and post back here with any GSAP-related questions. Just please keep in mind the forum guidelines - we're happy to answer GSAP-specific questions but we can't provide free general consulting about logic issues, 3rd party libraries, etc. 

 

Also, there's a helper function in the docs that may prove useful for endlessly looping things on the x-axis. https://greensock.com/docs/v3/HelperFunctions#loop

The helper function loop link not working. How I could get that? https://greensock.com/docs/v3/HelperFunctions#loop

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