Skip to content

Commit

Permalink
chore: build dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Heinz committed Jun 3, 2018
1 parent 63177bc commit 9694359
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
14 changes: 11 additions & 3 deletions dist/jquery.lory.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,17 @@ function lory(slider, opts) {

if (typeof nextIndex !== 'number') {
if (direction) {
nextIndex = index + slidesToScroll;
if (infinite && index + infinite * 2 !== slides.length) {
nextIndex = index + (infinite - index % infinite);
} else {
nextIndex = index + slidesToScroll;
}
} else {
nextIndex = index - slidesToScroll;
if (infinite && index % infinite !== 0) {
nextIndex = index - index % infinite;
} else {
nextIndex = index - slidesToScroll;
}
}
}

Expand Down Expand Up @@ -321,7 +329,7 @@ function lory(slider, opts) {
index = nextIndex;
}

if (infinite && (nextIndex === slides.length - infinite || nextIndex === 0)) {
if (infinite && (nextIndex === slides.length - infinite || nextIndex === slides.length - slides.length % infinite || nextIndex === 0)) {
if (direction) {
index = infinite;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.lory.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jquery.lory.min.js.map

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions dist/lory.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,17 @@ function lory(slider, opts) {

if (typeof nextIndex !== 'number') {
if (direction) {
nextIndex = index + slidesToScroll;
if (infinite && index + infinite * 2 !== slides.length) {
nextIndex = index + (infinite - index % infinite);
} else {
nextIndex = index + slidesToScroll;
}
} else {
nextIndex = index - slidesToScroll;
if (infinite && index % infinite !== 0) {
nextIndex = index - index % infinite;
} else {
nextIndex = index - slidesToScroll;
}
}
}

Expand Down Expand Up @@ -321,7 +329,7 @@ function lory(slider, opts) {
index = nextIndex;
}

if (infinite && (nextIndex === slides.length - infinite || nextIndex === 0)) {
if (infinite && (nextIndex === slides.length - infinite || nextIndex === slides.length - slides.length % infinite || nextIndex === 0)) {
if (direction) {
index = infinite;
}
Expand Down
Loading

0 comments on commit 9694359

Please sign in to comment.