Skip to content

Commit 0b6abba

Browse files
committed
Fix conflict
2 parents 6bfc736 + 5202dd8 commit 0b6abba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ var deviceWidth = Dimensions.get('window').width;
1616
var ScrollableTabView = React.createClass({
1717
getDefaultProps() {
1818
return {
19+
tabBarPosition: 'top',
1920
edgeHitWidth: 30,
20-
tabBarPosition: 'top'
21+
springTension: 50,
22+
springFriction: 10
2123
}
2224
},
2325

@@ -32,7 +34,7 @@ var ScrollableTabView = React.createClass({
3234
vx = gestureState.vx,
3335
newPage = this.state.currentPage;
3436

35-
if (relativeGestureDistance < -0.5 || (relativeGestureDistance < 0 && vx <= 0.5)) {
37+
if (relativeGestureDistance < -0.5 || (relativeGestureDistance < 0 && vx <= -0.5)) {
3638
newPage = newPage + 1;
3739
} else if (relativeGestureDistance > 0.5 || (relativeGestureDistance > 0 && vx >= 0.5)) {
3840
newPage = newPage - 1;
@@ -81,7 +83,7 @@ var ScrollableTabView = React.createClass({
8183
currentPage: pageNumber
8284
});
8385

84-
Animated.spring(this.state.scrollValue, {toValue: pageNumber, friction: 10, tension: 50}).start();
86+
Animated.spring(this.state.scrollValue, {toValue: pageNumber, friction: this.props.springFriction, tension: this.props.springTension}).start();
8587
},
8688

8789
renderTabBar(props) {

0 commit comments

Comments
 (0)