You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m = function() {
var e = 1;
if ("horizontal" == o.settings.mode && o.settings.slideWidth > 0)
if (o.viewport.width() < o.minThreshold)
e = o.settings.minSlides;
else if (o.viewport.width() > o.maxThreshold)
e = o.settings.maxSlides;
else {
var t = o.children.first().width();
e = Math.floor(o.viewport.width() / t)
}
else
"vertical" == o.settings.mode && (e = o.settings.minSlides);
return e
}
function m calculates the proper number of cards by o.viewport.width() / t, while t is the width of the card.
Line 21534
v = function() {
var e = 0;
if (o.settings.moveSlides > 0)
if (o.settings.infiniteLoop)
e = o.children.length / y();
else
for (var t = 0, n = 0; t < o.children.length; )
++e,
t = n + m(),
n += o.settings.moveSlides <= m() ? o.settings.moveSlides : m();
else
e = Math.ceil(o.children.length / m());
return e
}
The if statement always falls to e = Math.ceil(o.children.length / m());
o.children.length is 20.
If o.viewport.width is small, m() will be 1.
e will be 20.
This means the smaller your screen.width is, the more cards will be shown on the screen.
Probable solution:
e = Math.ceil(o.children.length / m());
to
e = m();
nodeBB version: 1.5.0
recent card version: 0.4.0
The text was updated successfully, but these errors were encountered: