Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SamJacobs committed Jun 15, 2020
1 parent 7daf56c commit ec3cbe7
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -1114,17 +1114,6 @@
}
verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
}
if (_.slideCount % _.options.slidesToScroll !== 0) {
if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
if (slideIndex > _.slideCount) {
_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
} else {
_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
}
}
}
} else {
if (slideIndex + _.options.slidesToShow > _.slideCount) {
_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
Expand Down Expand Up @@ -2551,17 +2540,9 @@
}

if (targetSlide < 0) {
if (_.slideCount % _.options.slidesToScroll !== 0) {
animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
} else {
animSlide = _.slideCount + targetSlide;
}
animSlide = _.slideCount + targetSlide;
} else if (targetSlide >= _.slideCount) {
if (_.slideCount % _.options.slidesToScroll !== 0) {
animSlide = 0;
} else {
animSlide = targetSlide - _.slideCount;
}
animSlide = targetSlide - _.slideCount;
} else {
animSlide = targetSlide;
}
Expand Down

0 comments on commit ec3cbe7

Please sign in to comment.