Skip to content

Commit

Permalink
fix for centerMode warping
Browse files Browse the repository at this point in the history
  • Loading branch information
puglyfe committed Jan 7, 2016
1 parent 9696b8f commit 47d5975
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/track.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var getSlideClasses = (spec) => {
slickCloned = (index < 0) || (index >= spec.slideCount);
if (spec.centerMode) {
centerOffset = Math.floor(spec.slidesToShow / 2);
slickCenter = (spec.currentSlide === index);
slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;
if ((index > spec.currentSlide - centerOffset - 1) && (index <= spec.currentSlide + centerOffset)) {
slickActive = true;
}
Expand Down

0 comments on commit 47d5975

Please sign in to comment.