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

Fix calculation for transition distance #33

Merged
merged 2 commits into from
Feb 19, 2017
Merged

Conversation

rechsteiner
Copy link
Owner

When swiping to pages on the left or right edge we previously just took
the min and max value of the content offset to make sure it didn’t move
too far. This caused the transition to suddenly stop instead of
smoothly transitioning to the correct place.

This updated checks if the new content offset will be near any of the
edges and calculate how much it will overshoot. Then we can just
subtract that value from the original distance to get the correct
transition.

Change the development team, remove the custom spacing indicator from
the calendar example, fix the unleash example and update the labels in
the storyboard example
When swiping to pages on the left or right edge we previously just took
the min and max value of the content offset to make sure it didn’t move
too far. This caused the transition to suddenly stop instead of
smoothly transitioning to the correct place.

This updated checks if the new content offset will be near any of the
edges and calculate how much it will overshoot. Then we can just
subtract that value from the original distance to get the correct
transition.
@rechsteiner rechsteiner merged commit d187795 into master Feb 19, 2017
@rechsteiner rechsteiner deleted the fix_transition branch February 19, 2017 18:49
rechsteiner added a commit that referenced this pull request Feb 20, 2017
The fix for the transition distance in #33 had an issue with selecting
an item on the opposite side while being near an edge. We only want to
subtract the overshoot when we’re moving towards an edge.
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