component / swipe

Swipe component with touch support (for image carousels, dynamic content etc)
http://component.github.com/swipe
61 stars 14 forks source link

smarter .next and .prev #21

Closed pirxpilot closed 11 years ago

pirxpilot commented 11 years ago

Both Swipe.next and Swipe.prev take an optional cycle parameter. If cycle is truthy we rewind slides at the beginning and end.

Swipe.cycle still works in the same way, but it's implemented as next(true) Updated docs and one of the examples.

rauchg commented 11 years ago

I'd personally like to avoid single boolean parameters. See: the boolean trap

juliangruber commented 11 years ago

this seems like a global option, maybe swipe.cicle() is more appropriate?

pirxpilot commented 11 years ago

Global option makes sense. Let me see if I can put together an alternative PR. @juliangruber - you meant swipe.cycle right? it's taken already - I am thinking swipe.loop()

pirxpilot commented 11 years ago

See #22 for a better/different way.