Swipe
Swipe copied to clipboard
Fix for 2 slide special case
This addresses issue #278.
When there are only 2 slides, the actual slides are duplicated in order to support continuous scrolling. This causes the actual indices passed to callbacks to be 0..3, when the expected values are 0..1.
This change special-cases the 2 slide scenario and ensures the externally visible values (callbacks, getPos()), are always within the expected 0..1 range.
This is essentially a more complete version of the other fixes which have been offered in other pull requests.
:+1: for merging this, ran into this just now, looks silly if you got a counter saying 4 of 2 ;)
:+1: thank you, i was just looking for this
Aww Yiss!
Please accept one of those pull requests :-)
I 2nd that... har har