mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 08:05:34 +00:00
add doc for native event in doc
This commit is contained in:
parent
174d37c1d9
commit
da850be6f0
@ -25,7 +25,24 @@ var currentCentroidY = TouchHistoryMath.currentCentroidY;
|
|||||||
* It provides a predictable wrapper of the responder handlers provided by the
|
* It provides a predictable wrapper of the responder handlers provided by the
|
||||||
* [gesture responder system](/react-native/docs/gesture-responder-system.html).
|
* [gesture responder system](/react-native/docs/gesture-responder-system.html).
|
||||||
* For each handler, it provides a new `gestureState` object alongside the
|
* For each handler, it provides a new `gestureState` object alongside the
|
||||||
* normal event.
|
* native event object:
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* onPanResponderMove: (event, gestureState) => {}
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* A native event is a synthetic touch event with the following form:
|
||||||
|
*
|
||||||
|
* - `nativeEvent`
|
||||||
|
* + `changedTouches` - Array of all touch events that have changed since the last event
|
||||||
|
* + `identifier` - The ID of the touch
|
||||||
|
* + `locationX` - The X position of the touch, relative to the element
|
||||||
|
* + `locationY` - The Y position of the touch, relative to the element
|
||||||
|
* + `pageX` - The X position of the touch, relative to the root element
|
||||||
|
* + `pageY` - The Y position of the touch, relative to the root element
|
||||||
|
* + `target` - The node id of the element receiving the touch event
|
||||||
|
* + `timestamp` - A time identifier for the touch, useful for velocity calculation
|
||||||
|
* + `touches` - Array of all current touches on the screen
|
||||||
*
|
*
|
||||||
* A `gestureState` object has the following:
|
* A `gestureState` object has the following:
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user