Closed PurHur closed 8 years ago
The bug is in getPositionByIndex
return -(i * slides.children().outerWidth(true) - ((slides.parent().outerWidth(true) - slides.children().outerWidth(true)) / 2))
i think the / 2 is only useful if the slider is not a left_sided.
I don't really get the problem i'm now testing and i see no problem when there is an even amount of elements. can you provide an example that doesn't work (jsfiddle or something)?
Here you go: http://jsfiddle.net/k0vh8jwc/1/ (pull the testing window to full size)
with -[margin right of an item](not / 2) it works
Ok i see, i'll work on a fix.
Added your fix, thanks.
The items will clamp to the half width if the outer container contains (in the visible part) an even number of elements. If its uneven it works perfect.
Did anybody encounter this problem before?