Swipe icon indicating copy to clipboard operation
Swipe copied to clipboard

Fix for 2 slide special case

Open dpolivy opened this issue 12 years ago • 4 comments

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.

dpolivy avatar Jul 24 '13 21:07 dpolivy

:+1: for merging this, ran into this just now, looks silly if you got a counter saying 4 of 2 ;)

MathiasTim avatar Jul 30 '13 21:07 MathiasTim

:+1: thank you, i was just looking for this

zovanni avatar Aug 30 '13 11:08 zovanni

Aww Yiss!

Please accept one of those pull requests :-)

Prinzhorn avatar Jan 03 '14 11:01 Prinzhorn

I 2nd that... har har

desmillicious avatar Jan 06 '14 03:01 desmillicious