Skip to content

smarter .next and .prev#21

Closed
pirxpilot wants to merge 1 commit intocomponent:masterfrom
pirxpilot:cycle-next-prev
Closed

smarter .next and .prev#21
pirxpilot wants to merge 1 commit intocomponent:masterfrom
pirxpilot:cycle-next-prev

Conversation

@pirxpilot
Copy link
Member

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.

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 reimplemented as
next(true)
@rauchg
Copy link
Member

rauchg commented Oct 15, 2013

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

@juliangruber
Copy link

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

@pirxpilot
Copy link
Member Author

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
Copy link
Member Author

See #22 for a better/different way.

@pirxpilot pirxpilot closed this Oct 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants