Antti Moilanen 72e203bf95 Fix ScrollView's snap index when scrolling forward and user taps the screen again while still scrolling
Summary:
Currently when snapping is used with ScrollView it calculates wrong snap index if user taps the screen second time while ScrollView is still scrolling. This happens because the code only adds 1 to the snap index when translationAlongAxis is smaller than zero. When user taps screen second time the translationAlongAxis is 0 and snap index ends up being one less than it should. This causes the ScrollView to scroll one step backwards.

Bug can be reproduced with the new examples I added to UIExplorer's ScrollView in [scrollview-snap-bug-example branch](https://github.com/anttimo/react-native/tree/scrollview-snap-bug-example).

Fix can be verified by running the same examples with the ScrollView fix in [scrollview-snap-bug-example-with-fix branch](https://github.com/anttimo/react-native/tree/scrollview-snap-bug-example-with-fix).

![scrollview-bug](https://cloud.githubusercontent.com/assets/150881/14427555/10d59d1e-fffe-11
Closes https://github.com/facebook/react-native/pull/6906

Differential Revision: D3927123

Pulled By: majak

fbshipit-source-id: 38828cc60a02a754bdc3ec72fb98d8777917f15e
2016-09-26 16:14:10 -07:00
..
2016-01-07 12:03:17 -08:00
2016-08-10 13:13:34 -07:00
2016-07-12 05:59:12 -07:00
2016-08-24 08:29:00 -07:00
2016-09-08 17:58:50 -07:00
2016-09-08 17:58:50 -07:00
2015-06-03 09:49:35 -08:00
2016-07-20 08:58:59 -07:00
2015-03-26 02:42:24 -08:00
2016-06-09 09:58:31 -07:00
2016-04-22 08:15:25 -07:00
2016-04-22 08:15:25 -07:00
2016-06-07 07:43:49 -07:00
2016-07-12 05:59:12 -07:00
2016-06-09 09:58:31 -07:00