You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
honzabilek4
changed the title
Wrong behaviour for slider with 2 slides
Wrong behaviour for slider with two slides
Mar 6, 2017
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()
andprevious()
functions and then use it ingoTo()
.Anyone has a better idea?
The text was updated successfully, but these errors were encountered: