Merge pull request #4884 from qbig/doc-animation

[Doc][Animation guide][Minor]fix comment by shifting to seperate line
This commit is contained in:
Satyajit Sahoo 2016-01-17 18:09:07 +05:30
commit 63d222667a
1 changed files with 8 additions and 5 deletions

View File

@ -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}
]);
```