File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -74,5 +74,5 @@ android {
74
74
dependencies {
75
75
compile fileTree(dir : " libs" , include : [" *.jar" ])
76
76
compile " com.android.support:appcompat-v7:23.0.1"
77
- compile " com.facebook.react:react-native:0.17 .+"
77
+ compile " com.facebook.react:react-native:0.19 .+"
78
78
}
Original file line number Diff line number Diff line change 6
6
"start" : " react-native start"
7
7
},
8
8
"dependencies" : {
9
- "react-native" : " ^ 0.19.0" ,
9
+ "react-native" : " 0.19.0" ,
10
10
"react-native-parallax-scroll-view" : " ../../"
11
11
}
12
12
}
Original file line number Diff line number Diff line change @@ -112,7 +112,14 @@ class ParallaxScrollView extends Component {
112
112
return this . getScrollResponder ( ) . getInnerViewNode ( ) ;
113
113
}
114
114
scrollTo ( destY , destX ) {
115
- this . getScrollResponder ( ) . scrollTo ( { x : destY , y : destX } ) ;
115
+ const sr = this . getScrollResponder ( ) ;
116
+ // TODO: Remove this when RN 0.21.0 is released.
117
+ // This is to make ParallaxScrollView compatible with older RN versions.
118
+ if ( sr . scrollTo . length === 2 ) {
119
+ this . getScrollResponder ( ) . scrollTo ( destY , destX ) ;
120
+ } else {
121
+ this . getScrollResponder ( ) . scrollTo ( { x : destY , y : destX } ) ;
122
+ }
116
123
}
117
124
scrollWithoutAnimationTo ( destY , destX ) {
118
125
this . getScrollResponder ( ) . scrollWithoutAnimationTo ( destY , destX ) ;
You can’t perform that action at this time.
0 commit comments