Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 47c84c0

Browse files
author
yi
authored
Merge pull request YIZHUANG#142 from Adrian3PG/fix-partialVisibilityGutter
Fix partialVisibilityGutter when showing more than one slide
2 parents b78d078 + 5a5aba2 commit 47c84c0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/CarouselItems.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ const CarouselItems = ({
6868
(partialVisbile || partialVisible) &&
6969
partialVisibilityGutter &&
7070
!notEnoughChildren
71-
? itemWidth - partialVisibilityGutter
71+
? itemWidth -
72+
partialVisibilityGutter / state.slidesToShow
7273
: itemWidth
7374
}px`
7475
: "auto"

0 commit comments

Comments
 (0)