From 5faf7be3f8b02de54d55169323b14db6ed424e12 Mon Sep 17 00:00:00 2001 From: Bob Mulder Date: Sat, 9 Dec 2017 00:58:40 +0100 Subject: [PATCH 1/3] Typo - scrollToIndex is not Function but a Number --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27ec9be..d96d798 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ constructor() { | __`dividerWidth`__ | _Number_ | `8` | The width of the divider between each page. (horizontal only) | | __`dividerColor`__ | _String_ | `black` | Color of divider. | | __`backgroundColor`__ | _String_ | `black` | ParallaxSwiper’s background color. | -| __`scrollToIndex`__ | _Function_ | 0 | Scrolls to index with a smooth animation. If used onComponentDidMount scroll is immediate with no animation. | +| __`scrollToIndex`__ | _Number_ | 0 | Scrolls to index with a smooth animation. If used onComponentDidMount scroll is immediate with no animation. | | __`onMomentumScrollEnd`__ | _Function_ | `N/A` | Fired when ScrollView stops scrolling and is passed the current page index. | | __`animatedValue`__ | _Number (Animated.Value)_ | `0` | Optionally pass a new instance of Animated.Value to access the animated value outside of ParallaxSwiper. | | __`vertical`__ | _Boolean_ | `false` | When true, ParallaxSwiper’s children are arranged vertically in a column instead of horizontally in a row. For now only iOS supports this. | From 443a74205a8a7e42e13f3326c9821e364ca383df Mon Sep 17 00:00:00 2001 From: Zachary Gibson Date: Sat, 9 Dec 2017 10:14:02 -0600 Subject: [PATCH 2/3] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d96d798..d53fbb8 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ constructor() { | __`dividerWidth`__ | _Number_ | `8` | The width of the divider between each page. (horizontal only) | | __`dividerColor`__ | _String_ | `black` | Color of divider. | | __`backgroundColor`__ | _String_ | `black` | ParallaxSwiper’s background color. | -| __`scrollToIndex`__ | _Number_ | 0 | Scrolls to index with a smooth animation. If used onComponentDidMount scroll is immediate with no animation. | +| __`scrollToIndex`__ | _Number_ | 0 | Scroll to index with a smooth animation using state. If set in componentDidMount() scroll is immediate with no animation. | | __`onMomentumScrollEnd`__ | _Function_ | `N/A` | Fired when ScrollView stops scrolling and is passed the current page index. | | __`animatedValue`__ | _Number (Animated.Value)_ | `0` | Optionally pass a new instance of Animated.Value to access the animated value outside of ParallaxSwiper. | | __`vertical`__ | _Boolean_ | `false` | When true, ParallaxSwiper’s children are arranged vertically in a column instead of horizontally in a row. For now only iOS supports this. | From 9befb5719392df795fd0a420f8a9dcdb0cd9773b Mon Sep 17 00:00:00 2001 From: Zachary Gibson Date: Sun, 10 Dec 2017 19:59:44 -0600 Subject: [PATCH 3/3] Clarify scrollToIndex usage even more --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d53fbb8..0b68188 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ constructor() { | __`dividerWidth`__ | _Number_ | `8` | The width of the divider between each page. (horizontal only) | | __`dividerColor`__ | _String_ | `black` | Color of divider. | | __`backgroundColor`__ | _String_ | `black` | ParallaxSwiper’s background color. | -| __`scrollToIndex`__ | _Number_ | 0 | Scroll to index with a smooth animation using state. If set in componentDidMount() scroll is immediate with no animation. | +| __`scrollToIndex`__ | _Number_ | 0 | Scroll to page with a smooth animation. _Note_: You need to use state if you want to change index any other time than when component is rendered. | | __`onMomentumScrollEnd`__ | _Function_ | `N/A` | Fired when ScrollView stops scrolling and is passed the current page index. | | __`animatedValue`__ | _Number (Animated.Value)_ | `0` | Optionally pass a new instance of Animated.Value to access the animated value outside of ParallaxSwiper. | | __`vertical`__ | _Boolean_ | `false` | When true, ParallaxSwiper’s children are arranged vertically in a column instead of horizontally in a row. For now only iOS supports this. |