add doc for native event in doc

This commit is contained in:
Qiao Liang 2015-12-20 16:20:01 +08:00
parent 174d37c1d9
commit da850be6f0

View File

@ -25,7 +25,24 @@ var currentCentroidY = TouchHistoryMath.currentCentroidY;
* It provides a predictable wrapper of the responder handlers provided by the
* [gesture responder system](/react-native/docs/gesture-responder-system.html).
* 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:
*