react-native-pullview
Advanced tools
+3
-2
@@ -19,3 +19,3 @@ 'use strict'; | ||
| const padding = 2; //scrollview与外面容器的距离 | ||
| const pullOkMargin = 50; //下拉到ok状态时topindicator距离顶部的距离 | ||
| const pullOkMargin = 100; //下拉到ok状态时topindicator距离顶部的距离 | ||
| const defaultTopIndicatorHeight = 30; //顶部刷新指示器的高度 | ||
@@ -80,2 +80,3 @@ const isDownGesture = (x, y) => { | ||
| this.defaultXY = {x: 0, y: topIndicatorHeight * -1}; | ||
| this.pullOkMargin = this.props.pullOkMargin ? this.props.pullOkMargin : pullOkMargin; | ||
| this.state = Object.assign({}, props, { | ||
@@ -117,3 +118,3 @@ pullPan: new Animated.ValueXY(this.defaultXY), | ||
| this.state.pullPan.setValue({x: this.defaultXY.x, y: this.defaultXY.y + gesture.dy / 3}); | ||
| if (gesture.dy < this.state.topIndicatorHeight + pullOkMargin) { | ||
| if (gesture.dy < this.state.topIndicatorHeight * 2 + this.pullOkMargin) { | ||
| if (!this.state.pulling) { | ||
@@ -120,0 +121,0 @@ this.props.onPulling && this.props.onPulling(this.resetDefaultXY); |
+1
-1
| { | ||
| "name": "react-native-pullview", | ||
| "version": "1.0.3", | ||
| "version": "1.0.4", | ||
| "description": "PullView component in React Native both for Android and iOS, pull to refresh", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11753
0.9%193
0.52%