From da850be6f0e0452b92e10a787d85b67b315b690c Mon Sep 17 00:00:00 2001 From: Qiao Liang Date: Sun, 20 Dec 2015 16:20:01 +0800 Subject: [PATCH] add doc for native event in doc --- .../browser/eventPlugins/PanResponder.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Libraries/vendor/react/browser/eventPlugins/PanResponder.js b/Libraries/vendor/react/browser/eventPlugins/PanResponder.js index f71a645675..afeba8a481 100644 --- a/Libraries/vendor/react/browser/eventPlugins/PanResponder.js +++ b/Libraries/vendor/react/browser/eventPlugins/PanResponder.js @@ -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: *