Skip to content

Commit 96ca49c

Browse files
committed
#69 : Rename showParticle -> showParticle
1 parent 858a5dc commit 96ca49c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Carousel/Carousel.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
if (typeof pageIndex !== 'number') {
124124
throw new Error('pageIndex should be a number')
125125
}
126-
await showPage(getParticleIndexByPageIndex({
126+
await showParticle(getParticleIndexByPageIndex({
127127
infinite,
128128
pageIndex,
129129
clonesCountHead: clonesCount.head,
@@ -304,7 +304,7 @@
304304
})
305305
306306
async function handlePageChange(pageIndex) {
307-
await showPage(getParticleIndexByPageIndex({
307+
await showParticle(getParticleIndexByPageIndex({
308308
infinite,
309309
pageIndex,
310310
clonesCountHead: clonesCount.head,
@@ -332,10 +332,10 @@
332332
let jumped = false
333333
if (infinite) {
334334
if (currentParticleIndex === 0) {
335-
await showPage(particlesCount - clonesCount.total, { animated: false })
335+
await showParticle(particlesCount - clonesCount.total, { animated: false })
336336
jumped = true
337337
} else if (currentParticleIndex === particlesCount - clonesCount.tail) {
338-
await showPage(clonesCount.head, { animated: false })
338+
await showParticle(clonesCount.head, { animated: false })
339339
jumped = true
340340
}
341341
}
@@ -357,7 +357,7 @@
357357
!jumped && applyAutoplayIfNeeded(autoplay) // no need to wait it finishes
358358
}
359359
360-
async function showPage(particleIndex, options) {
360+
async function showParticle(particleIndex, options) {
361361
await changePage(
362362
() => store.moveToParticle({
363363
particleIndex,
@@ -414,7 +414,7 @@
414414
}
415415
function handleSwipeEnd() {
416416
if (!swiping) return
417-
showPage(currentParticleIndex)
417+
showParticle(currentParticleIndex)
418418
}
419419
async function handleSwipeFailed() {
420420
if (!swiping) return

0 commit comments

Comments
 (0)