-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Improve wording and add defaults to TapHandler docs #1319
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,51 +19,51 @@ See [set of properties inherited from base handler class](handler-common.md#prop | |
|
|
||
| ### `minPointers` | ||
|
|
||
| Minimum number of fingers required to be placed before the handler [activates](state.md#active). Should be a positive integer. Default is 1. | ||
| Minimum number of pointers (fingers) required to be placed before the handler [activates](state.md#active). Should be a positive integer. The default value is 1. | ||
|
|
||
| ### `maxDurationMs` | ||
|
|
||
| Time expressed in milliseconds which defines how fast a finger has to be released after touch. | ||
| Maximum time, expressed in milliseconds, that defines how fast a finger must be released after a touch. The default value is 500. | ||
|
|
||
| ### `maxDelayMs` | ||
|
|
||
| Time expressed in milliseconds which could pass before next tap if many taps are required. Default is 300ms. | ||
| Maximum time, expressed in milliseconds, that can pass before the next tap--if many taps are required. The default value is 500. | ||
|
|
||
| ### `numberOfTaps` | ||
|
|
||
| Number of tap gestures required to [activate](state.md#active) the handler. Default is 1. | ||
| Number of tap gestures required to [activate](state.md#active) the handler. The default value is 1. | ||
|
|
||
| ### `maxDeltaX` | ||
|
|
||
| When the finger travels the given distance expressed in points along X axis and handler hasn't yet [activated](state.md#active) it will fail recognizing the gesture. | ||
| Maximum distance, expressed in points, that defines how far the finger is allowed to travel along the X axis during a tap gesture. If the finger travels further than the defined distance along the X axis and the handler hasn't yet [activated](state.md#active), it will fail to recognize the gesture. | ||
|
|
||
| ### `maxDeltaY` | ||
|
|
||
| When the finger travels the given distance expressed in points along Y axis and handler hasn't yet [activated](state.md#active) it will fail recognizing the gesture. | ||
| Maximum distance, expressed in points, that defines how far the finger is allowed to travel along the Y axis during a tap gesture. If the finger travels further than the defined distance along the Y axis and the handler hasn't yet [activated](state.md#active), it will fail to recognize the gesture. | ||
|
|
||
| ### `maxDist` | ||
|
|
||
| When the finger travels the given distance expressed in points and handler hasn't yet [activated](state.md#active) it will fail recognizing the gesture. | ||
| Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a tap gesture. If the finger travels further than the defined distance and the handler hasn't yet [activated](state.md#active), it will fail to recognize the gesture. | ||
|
|
||
| ## Event data | ||
|
|
||
| See [set of event attributes from base handler class](handler-common.md#event-data). Below is a list of gesture event attributes specific to `TapGestureHandler`: | ||
| See [set of event attributes from base handler class](handler-common.md#event-data). Below is a list of gesture event attributes specific to the `TapGestureHandler` component: | ||
|
|
||
| ### `x` | ||
|
|
||
| X coordinate of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the view attached to the handler. Expressed in point units. | ||
| X coordinate, expressed in points, of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the view attached to the handler. | ||
|
|
||
| ### `y` | ||
|
|
||
| Y coordinate of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the view attached to the handler. Expressed in point units. | ||
| Y coordinate, expressed in points, of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the view attached to the handler. | ||
|
|
||
| ### `absoluteX` | ||
|
|
||
| X coordinate of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the root view. The value is expressed in point units. It is recommended to use it instead of [`x`](#x) in cases when the original view can be transformed as an effect of the gesture. | ||
| X coordinate, expressed in points, of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the root view. It is recommended to use this instead of [`x`](#x) in cases when the view attached to the handler can be transformed as an effect of the gesture. | ||
|
|
||
| ### `absoluteY` | ||
|
|
||
| Y coordinate of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the root view. The value is expressed in point units. It is recommended to use it instead of [`y`](#y) in cases when the original view can be transformed as an effect of the gesture. | ||
| Y coordinate, expressed in points, of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the root view. It is recommended to use this instead of [`y`](#y) in cases when the view attached to the handler can be transformed as an effect of the gesture. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about "this". I'd leave the original "it" or change it to the "
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I think " |
||
|
|
||
| ## Example | ||
|
|
||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use "—" instead of "--".