diff --git a/src/components/Carousel/Carousel.svelte b/src/components/Carousel/Carousel.svelte index 9c234e8..1dff4eb 100644 --- a/src/components/Carousel/Carousel.svelte +++ b/src/components/Carousel/Carousel.svelte @@ -127,16 +127,16 @@ }) let currentPageIndex = 0 - $: originalCurrentPageIndex = getCurrentPageIndexWithoutClones({ + $: currentPageIndexWithoutClones = getCurrentPageIndexWithoutClones({ currentPageIndex, pagesCount, oneSideClonesCount, infinite, }) - $: dispatch('pageChange', originalCurrentPageIndex) + $: dispatch('pageChange', currentPageIndexWithoutClones) let pagesCount = 0 - $: originalPagesCount = getPagesCountWithoutClones({ + $: pagesCountWithoutClones = getPagesCountWithoutClones({ pagesCount, oneSideClonesCount, }) @@ -168,8 +168,8 @@ // used for lazy loading images, preloaded only current, adjacent and cloanable images $: loaded = getAdjacentIndexes({ - pageIndex: originalCurrentPageIndex, - pagesCount: originalPagesCount, + pageIndex: currentPageIndexWithoutClones, + pagesCount: pagesCountWithoutClones, infinite, }) @@ -364,7 +364,7 @@ @@ -408,7 +408,7 @@ @@ -418,13 +418,13 @@ {#if dots} handlePageChange(event.detail)} >