Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Commit

Permalink
fix check state
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusuke Shibata committed Nov 26, 2017
1 parent de14958 commit 7f58ff7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion demo/src/App.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default (props, state, children) => {
style={{
opacity: pMax,
transformOrigin: '50% 0%',
transform: `scale(${Math.min(pMax,1)}, ${Math.min(pMax,1)})`
transform: `scale(${Math.min(pMax, 1)}, ${Math.min(pMax, 1)})`
}}
fill={props.color}
points='30,24 26,20 34,20'
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class PullRefresh extends Component {
}
onDown(evt) {
const { refreshed, refreshing } = this.state
if(refreshed || refreshing) return
if(this._willRefresh || refreshed || refreshing) return
this._down = true
const ey = evt.touches ? evt.touches[0].pageY : evt.pageY
this._py = ey
Expand Down Expand Up @@ -53,7 +53,7 @@ export default class PullRefresh extends Component {
}
onMove(evt) {
const { refreshed, refreshing } = this.state
if(!this._down || refreshed || refreshing) return
if(this._willRefresh || !this._down || refreshed || refreshing) return
const ey = evt.touches ? evt.touches[0].pageY : evt.pageY
if(scrollTop(this) <= 0) {
this._y = this._y + ey - this._py
Expand Down Expand Up @@ -102,7 +102,7 @@ PullRefresh.propTypes = {
disabled: PropTypes.bool,
color: PropTypes.string,
bgColor: PropTypes.string,
render: PropTypes.func,
render: PropTypes.func
// max: PropTypes.number,
// offset: PropTypes.number,
// size: PropTypes.number,
Expand All @@ -118,7 +118,7 @@ PullRefresh.defaultProps = {
disabled: false,
color: '#787878',
bgColor: '#fff',
render: renderDefault,
render: renderDefault
// max: 100,
// offset: 0,
// size: 40,
Expand Down

0 comments on commit 7f58ff7

Please sign in to comment.