AnythingSlider icon indicating copy to clipboard operation
AnythingSlider copied to clipboard

adjustMultiple not updated when change showMultiple from >1 to 1

Open kynn84 opened this issue 13 years ago • 1 comments

Hi,

Recently, i've encounter a problem when i change the showMultiple option from 2 to 1 and call for updateSlider()

i found out that form the code:

1 < b.showMultiple && (b.showMultiple > a.pages && (b.showMultiple = a.pages), a.adjustMultiple = b.infiniteSlides && 1 < a.pages ? 0 : b.showMultiple - 1);

since i'm changing the value of showMultiple from 2 to 1, it will not reset the value of adjustMultiple form 1 to 0, since the function will only execute when showMultiple is bigger than 1. This will cause the prev and next button to be displayed incorrectly

i think the best solution is to reset the value of adjustMultiple to 0 before the that line i.e,

a.adjustMultiple = 0;
1 < b.showMultiple && (b.showMultiple > a.pages && (b.showMultiple = a.pages), a.adjustMultiple = b.infiniteSlides && 1 < a.pages ? 0 : b.showMultiple - 1);

kynn84 avatar Aug 14 '12 12:08 kynn84

Thanks for reporting this! There are still a few bugs in the way AnythingSlider handles showMultiple. Hopefully I'll have it all fixed in the next update.

Mottie avatar Aug 14 '12 19:08 Mottie