-
Notifications
You must be signed in to change notification settings - Fork 213
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
Feature: additional funtionality #56
Merged
kornelski
merged 5 commits into
kornelski:master
from
Nona-Creative:feat/additional-funtionality
Sep 21, 2015
Merged
Feature: additional funtionality #56
kornelski
merged 5 commits into
kornelski:master
from
Nona-Creative:feat/additional-funtionality
Sep 21, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Return `xDirection` and `yDirection` in the `getAbsoluteMovement()` method.
Return the direction of the swipe in the `beforeswipe` event. Enables developers to make better decisions when receiving this event. Renamed `xDirection` and `yDirection` to `directionX` and `directionY`.
Much simpler velocity calculation. Use the direction from the new `getAbsoluteMovement()` method instead of recalculating. Fixes a bug where the direction for a right swipe would sometimes be reported as a left swipe. This was due to the direction calculation that has been replaced in the `swipe` event's `onEnd` method.
Allow an optional `keepSwipingPercent` to be passed in to the constructor that lets you set a percentage (in terms of how far out the left- or rightmost edge of the list item has moved across the width of the list) that will trigger a swipe regardless of velocity. This allows a user to swipe out past x percent, think for a while, and if they still want it to swipe out let go and have it swipe out if past the minimum percent. Makes the swiping gestures behave more like they do in native Android applications. The default value for swipe percent is 0 if it is missing, which returns false for the check. Use the direction returned from the `getAbsoluteMovement()` method instead of re-calculating. Fixed a bug with the assignment of options in the constructor.
Added options to change the values for min velocity and for min swip time. Added defaults for when these new options are not present.
Resolves #42 |
Looking great. +1 |
kornelski
added a commit
that referenced
this pull request
Sep 21, 2015
Feature: additional funtionality
Cool! Thanks. |
Happy to help. We may have some more improvements to submit in the future. Thanks for the great library. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Return
directionX
anddirectionY
in thegetAbsoluteMovement()
method.Return the x and y direction with
beforeswipe
. Enables developersto make better decisions when receiving this event.
Refactored
swipe
event with a much simpler velocity calculation.Use the direction from the new
getAbsoluteMovement()
method instead of recalculating in the swipe event. Fixes a bug where the direction for a right swipe would sometimes be reported as a left swipe. This was due to the direction calculation that has now been replaced in theswipe
event'sonEnd
method.Ability to define a "keep swiping" trigger point to be passed in to the constructor that lets you set a percentage (in terms of how far out the left- or rightmost edge of the list item has moved across the width of the list) that will trigger a swipe regardless of velocity. This allows a user to swipe out past x percent, think for a while, and if they still want it to swipe out let go and have it swipe out if past the minimum percent. Makes the swiping gestures behave more like they do in native Android applications.
The default value for swipe percent is 0 if it is missing, which returns false for the check.
Fixed a bug with the assignment of options in the constructor.
Configurable velocity and time for swipe with defaults for when these configurable options are not present which match the original settings.