Slidy: Looping causes weird display issue and looping thumbnails
On Slidy Svelte I have an issue where when I set loop = true I am able to swipe the thumbnails. This also seems to cause the pictures to dissapear for a while and then display out of order.
You can see the issue here on my test site: https://beta.obrien-group.co.nz/product/laminate
How it’s supposed to look:
When the images dispear:
When the images do come back:
The issue can be replicated just by fiddeling with it for a while.
My slidy options are:
const slidyOptions = {
clamp: 0,
indent: 1,
sensity: 2,
gravity: 1,
duration: 375,
animation: stairs,
easing: linear,
snap: 'center',
axis: 'x',
loop: true,
arrows: false,
thumbnail: true,
progress: false,
navigation: false,
counter: false,
};
My markup:
<div class="slidyContainer">
<Slidy
bind:index={currentSlideIndex}
{slides}
{...slidyOptions}
--slidy-height="500px"
/>
<button on:click={() => {showProjectModal = true}}>See more {projectInfo[currentSlideIndex].name}</button>
</div>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (11 by maintainers)
fixed 👌🏻update to @slidy/svelte@3.4.6 version
seems like this https://svelte.dev/repl/d8a7949b2acc4787be409124cd2b4440
reproduction stend
Oh… I see the bug - slides loses position after scroll & click looped thumbs?
needs time for testing
Thanks, I’ll give that a go on Monday 😊
pretty furniture 👍🏻
https://github.com/user-attachments/assets/56a48829-d3da-4be0-b17d-c4eedc2137a9
Slidy in loop mode truly swapping DOMnodes by edges of carousel…
For right visual behavior slidy container needs to be wider then all carousel items…
https://github.com/user-attachments/assets/7107f02e-4ed5-4090-ba3f-53f793837c7f