react-easy-swipe
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -232,11 +232,14 @@ (function (global, factory) { | ||
var tolerance = this.props.tolerance; | ||
if (this.moving) { | ||
if (this.movePosition.deltaX < 0) { | ||
if (this.movePosition.deltaX < -tolerance) { | ||
this.props.onSwipeLeft(1, event); | ||
} else if (this.movePosition.deltaX > 0) { | ||
} else if (this.movePosition.deltaX > tolerance) { | ||
this.props.onSwipeRight(1, event); | ||
} | ||
if (this.movePosition.deltaY < 0) { | ||
if (this.movePosition.deltaY < -tolerance) { | ||
this.props.onSwipeUp(1, event); | ||
} else if (this.movePosition.deltaY > 0) { | ||
} else if (this.movePosition.deltaY > tolerance) { | ||
this.props.onSwipeDown(1, event); | ||
@@ -288,3 +291,4 @@ } | ||
onSwipeMove: _propTypes2.default.func, | ||
onSwipeEnd: _propTypes2.default.func | ||
onSwipeEnd: _propTypes2.default.func, | ||
tolerance: _propTypes2.default.number.isRequired | ||
}; | ||
@@ -300,5 +304,7 @@ ReactSwipe.defaultProps = { | ||
onSwipeMove: function onSwipeMove() {}, | ||
onSwipeEnd: function onSwipeEnd() {} | ||
onSwipeEnd: function onSwipeEnd() {}, | ||
tolerance: 0 | ||
}; | ||
exports.default = ReactSwipe; | ||
}); |
{ | ||
"name": "react-easy-swipe", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "React easy swipe - Easy handler for common touch operations", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186545
423