#69 : Support floating particlesToScroll, particlesToShow

This commit is contained in:
Vadim
2021-09-11 13:27:52 +03:00
parent 938a95ad3b
commit a4f6a1c629

View File

@@ -41,8 +41,9 @@ export function getClonesCount({
}) { }) {
const clonesCount = infinite const clonesCount = infinite
? { ? {
head: partialPageSize || particlesToShow, // need to round with ceil as particlesToShow, particlesToShow can be floating (e.g. 1.5, 3.75)
tail: particlesToShow, head: Math.ceil(partialPageSize || particlesToShow),
tail: Math.ceil(particlesToShow),
} : { } : {
head: 0, head: 0,
tail: 0, tail: 0,