From 5dcd269492db5344e1ee4bf8d23d57f0777d16e7 Mon Sep 17 00:00:00 2001 From: Pavlo Aksonov Date: Tue, 29 Mar 2016 09:37:15 +0200 Subject: [PATCH] Revert "change DefaultRenderer to correspond new API" --- package.json | 6 +++--- src/DefaultRenderer.js | 15 ++++----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 58781aa31..5cced6168 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-router-flux", - "version": "3.3.0-rc", + "version": "3.2.3", "description": "React Native Router using Flux architecture", "repository": { "type": "git", @@ -39,7 +39,7 @@ "react-native-tabs": "^1.0.2" }, "peerDependencies": { - "react-native": "^0.23.0-rc1", + "react-native": "^0.22.0-rc", "react": "^0.14.7" }, "devDependencies": { @@ -56,7 +56,7 @@ "react": "^0.14.7", "react-addons-test-utils": "^0.14.7", "react-dom": "^0.14.7", - "react-native": "^0.23.0-rc1", + "react-native": "^0.22.0", "react-native-mock": "0.0.6", "sinon": "^1.17.3" } diff --git a/src/DefaultRenderer.js b/src/DefaultRenderer.js index c11cac88b..75befe861 100644 --- a/src/DefaultRenderer.js +++ b/src/DefaultRenderer.js @@ -12,8 +12,6 @@ const { Card: NavigationCard, RootContainer: NavigationRootContainer, Header: NavigationHeader, - CardStackStyleInterpolator: CardStackStyleInterpolator, - LinearPanResponder: LinearPanResponder } = NavigationExperimental; import Actions from './Actions'; import getInitialState from './State'; @@ -55,7 +53,7 @@ export default class DefaultRenderer extends Component { style={[styles.animatedView, navigationState.style]} renderOverlay={this._renderHeader} direction={navigationState.direction || 'horizontal'} - applyAnimation={(pos, navState) => + setTiming={(pos, navState) => Animated.timing(pos, {toValue: navState.index, duration}).start() } renderScene={this._renderCard} @@ -71,19 +69,14 @@ export default class DefaultRenderer extends Component { } _renderCard(/*NavigationSceneRendererProps*/ props) { - const isVertical = props.scene.navigationState.direction === 'vertical'; - - const style = isVertical ? CardStackStyleInterpolator.forVertical(props) : CardStackStyleInterpolator.forHorizontal(props); - const defaultPanHandlers = isVertical ? LinearPanResponder.forVertical(props) : LinearPanResponder.forHorizontal(props); - const panHandlers = props.scene.navigationState.panHandlers || defaultPanHandlers; - return ( ); }