Skip to content

Commit 9b159ca

Browse files
committed
[antoniandre#68] remove the translation if infinite mode & 1 only slide.
1 parent 54e1d30 commit 9b159ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/vueperslides/vueperslides.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ export default {
467467
getBasicTranslation () {
468468
let translation = this.slides.current / this.conf.visibleSlides
469469
470-
if (this.conf.infinite) translation += 1 / this.conf.visibleSlides // A clone is prepended to the slides track.
470+
// A clone is prepended to the slides track.
471+
if (this.conf.infinite && this.slidesCount > 1) translation += 1 / this.conf.visibleSlides
471472
472473
return translation
473474
},

0 commit comments

Comments
 (0)