Jump to content
Search Community

Cannot get infinite slider working with dynamic box widths

nicolaseielll test
Moderator Tag

Recommended Posts

I'm trying to create a logo slider with the horizontalLoop helper function, my problem is that the logos are different widths & I would need the spacings between them to be equal so that they would not seem uneven. This requires the boxes to be the width of the logos but the slider breaks if I take the static width off from CSS.

Is there a simple solution to this or would it require editing the original loop function?

Here's a simple demo of the problem:https://stackblitz.com/edit/nuxt-starter-ejwuh5?file=components%2FSlider.vue

I tried to make it as simple as possible, you can try to add/remove the width from the box to see the problem.

Thank you guys in advance, I really appreciate what you're doing with this platform!

 

Link to comment
Share on other sites

Hi,

 

I had a quick glance at your code and instead of trying to solve the issue there I created an example using page transitions and the helper function:

https://stackblitz.com/edit/nuxt-starter-dhwrqn

 

As you  can see it works as expected on route changes, so there must be something else in your setup that is causing this.

 

Hopefully this helps.

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