diff --git a/slick/slick.js b/slick/slick.js index bb94a86d4..742c6bd1f 100644 --- a/slick/slick.js +++ b/slick/slick.js @@ -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; @@ -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; }