Skip to content

Commit 25fe08b

Browse files
committed
1.7.1
1 parent 031df42 commit 25fe08b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

index.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,20 @@ Code related to dealing with advancing between pages
16771677
// Get an array of slide offsets of the slides that are 100% in the
16781678
// viewport. Aka, the count will be equal the currentSlidesPerPage per page.
16791679
activeSlides: function () {
1680-
var ref, start; // Get the offset of the leftmost slide in the current viewport
1680+
var ref, ref1, start;
1681+
1682+
if (this.isVariableWidth) {
1683+
return function () {
1684+
var results = [];
1685+
1686+
for (var i = 0, ref = this.slidesCount; 0 <= ref ? i < ref : i > ref; 0 <= ref ? i++ : i--) {
1687+
results.push(i);
1688+
}
1689+
1690+
return results;
1691+
}.apply(this);
1692+
} // Get the offset of the leftmost slide in the current viewport
1693+
16811694

16821695
start = this.paginateBySlide ? this.boundedIndex : this.boundedIndex * this.currentSlidesPerPage; // Adjust the start if not looping and on the last page of slides and there
16831696
// aren't enough slides to make a full page
@@ -1689,7 +1702,7 @@ Code related to dealing with advancing between pages
16891702
return function () {
16901703
var results = [];
16911704

1692-
for (var i = start, ref = start + this.currentSlidesPerPage; start <= ref ? i < ref : i > ref; start <= ref ? i++ : i--) {
1705+
for (var i = start, ref1 = start + this.currentSlidesPerPage; start <= ref1 ? i < ref1 : i > ref1; start <= ref1 ? i++ : i--) {
16931706
results.push(i);
16941707
}
16951708

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-ssr-carousel",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"description": "A performance focused Vue carousel designed for SSR/SSG environments.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)