#69 : Support floating particlesToScroll, particlesToShow
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user