Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defaultPoint option #59

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add defaultPoint option #59

wants to merge 4 commits into from

Conversation

Mwr247
Copy link

@Mwr247 Mwr247 commented Aug 17, 2015

Added an option (and related tests) to allow for the specification of a default point to be used at initialization. Default behavior is to work as before.

An example use case might be a calendar that allows swiping to scan months forward and back, but with a limited range of selectable dates. This would allow for starting in the current month instead of the earliest month. Also useful for image sliders that might want to start on a random slide, or for mobile where a user could swipe left or right on content to view different options.

Mwr247 added 4 commits August 17, 2015 14:59
Previously, the default point on load was assumed to be 0. This sets that as the default, but allows it to be overridden in the options so that points other than point 0 may be allowed as the default.
The previous commit made assumptions on refresh that transition delay would/should be 0. This has been fixed.
Tests along the pattern of maxPoint, that when defaultPoint is set, the correct values should be reflected by currentPoint
Add defaultPoint feature
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.

1 participant