From 289d9f250ff0597b1313e206f810c781d2a7d4c1 Mon Sep 17 00:00:00 2001 From: Qiao Liang Date: Sun, 20 Dec 2015 16:17:57 +0800 Subject: [PATCH] fix comment by shifting to seperate line --- docs/Animations.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/Animations.md b/docs/Animations.md index 0050b3d58..c4686814c 100644 --- a/docs/Animations.md +++ b/docs/Animations.md @@ -169,9 +169,9 @@ already implemented in the [`Easing`](https://github.com/facebook/react-native/blob/master/Libraries/Animation/Animated/Easing.js) class including quadratic, exponential, and bezier curves as well as functions like step and bounce. `interpolation` also has configurable behavior for -extrapolating the `outputRange`. You can set the extrapolation by setting the `extrapolate`, -`extrapolateLeft` or `extrapolateRight` options. The default value is -`extend` but you can use `clamp` to prevent the output value from exceeding +extrapolating the `outputRange`. You can set the extrapolation by setting the `extrapolate`, +`extrapolateLeft` or `extrapolateRight` options. The default value is +`extend` but you can use `clamp` to prevent the output value from exceeding `outputRange`. #### Tracking Dynamic Values @@ -212,11 +212,14 @@ respectively (`gestureState` is the second arg passed to the `PanResponder` hand ```javascript onScroll={Animated.event( - [{nativeEvent: {contentOffset: {x: scrollX}}}] // scrollX = e.nativeEvent.contentOffset.x + // scrollX = e.nativeEvent.contentOffset.x + [{nativeEvent: {contentOffset: {x: scrollX}}}] )} onPanResponderMove={Animated.event([ null, // ignore the native event - {dx: pan.x, dy: pan.y} // extract dx and dy from gestureState + // extract dx and dy from gestureState + // like 'pan.x = gestureState.dx, pan.y = gestureState.dy' + {dx: pan.x, dy: pan.y} ]); ```