Remove slides

This commit is contained in:
Vadim
2021-01-23 17:02:57 +03:00
parent c2c0ad495d
commit 56c3d2872f
7 changed files with 13 additions and 81 deletions

View File

@@ -1,33 +0,0 @@
export function getPagesCount({ slidesCount, slidesToShow }) {
return Math.ceil(slidesCount/slidesToShow)
}
export function getSlidesToShowTail({
slidesToShow,
slidesCount,
pagesCount
}) {
return slidesCount - slidesToShow * (pagesCount - 1)
}
export function getIsNotCompletePage({
pageIndex,
pagesCount,
}) {
return pageIndex === pagesCount - 1 && pagesCount !== 1
}
export function getSlideSize({
pageWidth,
slidesToShow,
slidesToShowTail,
isNotCompletePage
}) {
return isNotCompletePage
? Math.round(pageWidth/slidesToShowTail)
: Math.round(pageWidth/slidesToShow)
}
export function getPageIndex({ slideIndex, slidesToShow }) {
return Math.floor(slideIndex/slidesToShow)
}