From 96ca49c7f43929b64a08a1eab34c1574d4c809eb Mon Sep 17 00:00:00 2001 From: Vadim Date: Sun, 3 Oct 2021 12:13:06 +0300 Subject: [PATCH] #69 : Rename showParticle -> showParticle --- src/components/Carousel/Carousel.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Carousel/Carousel.svelte b/src/components/Carousel/Carousel.svelte index f55fcbf..d323f60 100644 --- a/src/components/Carousel/Carousel.svelte +++ b/src/components/Carousel/Carousel.svelte @@ -123,7 +123,7 @@ if (typeof pageIndex !== 'number') { throw new Error('pageIndex should be a number') } - await showPage(getParticleIndexByPageIndex({ + await showParticle(getParticleIndexByPageIndex({ infinite, pageIndex, clonesCountHead: clonesCount.head, @@ -304,7 +304,7 @@ }) async function handlePageChange(pageIndex) { - await showPage(getParticleIndexByPageIndex({ + await showParticle(getParticleIndexByPageIndex({ infinite, pageIndex, clonesCountHead: clonesCount.head, @@ -332,10 +332,10 @@ let jumped = false if (infinite) { if (currentParticleIndex === 0) { - await showPage(particlesCount - clonesCount.total, { animated: false }) + await showParticle(particlesCount - clonesCount.total, { animated: false }) jumped = true } else if (currentParticleIndex === particlesCount - clonesCount.tail) { - await showPage(clonesCount.head, { animated: false }) + await showParticle(clonesCount.head, { animated: false }) jumped = true } } @@ -357,7 +357,7 @@ !jumped && applyAutoplayIfNeeded(autoplay) // no need to wait it finishes } - async function showPage(particleIndex, options) { + async function showParticle(particleIndex, options) { await changePage( () => store.moveToParticle({ particleIndex, @@ -414,7 +414,7 @@ } function handleSwipeEnd() { if (!swiping) return - showPage(currentParticleIndex) + showParticle(currentParticleIndex) } async function handleSwipeFailed() { if (!swiping) return