@@ -694,7 +694,7 @@ export const Carousel = defineComponent({
694
694
} )
695
695
696
696
const scrolledOffset = computed ( ( ) => {
697
- let scrolledOffset = 0
697
+ let output = 0
698
698
699
699
if ( isAuto . value ) {
700
700
const slideIndex =
@@ -706,16 +706,16 @@ export const Carousel = defineComponent({
706
706
} )
707
707
708
708
if ( currentSlideIndex . value < 0 ) {
709
- scrolledOffset =
709
+ output =
710
710
slidesRect . value
711
711
. slice ( currentSlideIndex . value )
712
712
. reduce ( ( acc , slide ) => acc + slide [ dimension . value ] + config . gap , 0 ) * - 1
713
713
} else {
714
- scrolledOffset = slidesRect . value
714
+ output = slidesRect . value
715
715
. slice ( 0 , currentSlideIndex . value )
716
716
. reduce ( ( acc , slide ) => acc + slide [ dimension . value ] + config . gap , 0 )
717
717
}
718
- scrolledOffset -= snapAlignOffset
718
+ output -= snapAlignOffset
719
719
720
720
// remove whitespace
721
721
if ( ! config . wrapAround ) {
@@ -727,8 +727,8 @@ export const Carousel = defineComponent({
727
727
viewportRect . value [ dimension . value ] -
728
728
config . gap
729
729
730
- scrolledOffset = getNumberInRange ( {
731
- val : scrolledOffset ,
730
+ output = getNumberInRange ( {
731
+ val : output ,
732
732
max : maxSlidingValue ,
733
733
min : 0 ,
734
734
} )
@@ -748,10 +748,10 @@ export const Carousel = defineComponent({
748
748
min : 0 ,
749
749
} )
750
750
}
751
- scrolledOffset = scrolledSlides * effectiveSlideSize . value
751
+ output = scrolledSlides * effectiveSlideSize . value
752
752
}
753
753
754
- return scrolledOffset * ( isReversed . value ? 1 : - 1 )
754
+ return output * ( isReversed . value ? 1 : - 1 )
755
755
} )
756
756
757
757
const trackTransform : ComputedRef < string | undefined > = computed ( ( ) => {
0 commit comments