-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Hi,
While having slider with only two slides and carousel on, you can notice that the isForward variable is always wrong on the second slide. This causes the silder to animate the other direction than expected.
It's the same issue as mentioned in #43, wich was solved only partially.
This happens due to the ambiguity of the next / previous slides. It's the same index (0) in fact and therefore it is impossible to decide the direction here:
var isForwards = (index > this.currentItemIndex || index === 0 && this.currentItemIndex === this.lastItemIndex) && !(index === this.lastItemIndex && this.currentItemIndex === 0);
or here
One option is to determine the direction right in the next() and previous() functions and then use it in goTo().
Anyone has a better idea?