From d1f8add4d0554d99954d1febb8386fbadb5d1eca Mon Sep 17 00:00:00 2001 From: Seph Soliman Date: Tue, 11 Oct 2016 08:07:19 -0700 Subject: [PATCH] Documentation fix: dx vs. x0 Summary: > What existing problem does the pull request solve? Purely a documentation/example error. Was misled/wasted time debugging because of this issue. Description: `dx`/`dy` are zero in onPanResponderGrant, not `x0`/`y0`. `x0`/`y0` will be the coordinates relative to the granted element, which are rarely zero. Closes https://github.com/facebook/react-native/pull/9984 Differential Revision: D4001603 Pulled By: hramos fbshipit-source-id: 32580795f62394585ccfb8f9a2ae65b0b72add69 --- Libraries/Interaction/PanResponder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Interaction/PanResponder.js b/Libraries/Interaction/PanResponder.js index 0692ffbfc..174e12714 100644 --- a/Libraries/Interaction/PanResponder.js +++ b/Libraries/Interaction/PanResponder.js @@ -80,7 +80,7 @@ const currentCentroidY = TouchHistoryMath.currentCentroidY; * // The guesture has started. Show visual feedback so the user knows * // what is happening! * - * // gestureState.{x,y}0 will be set to zero now + * // gestureState.d{x,y} will be set to zero now * }, * onPanResponderMove: (evt, gestureState) => { * // The most recent move distance is gestureState.move{X,Y}