Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-easy-swipe

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-easy-swipe - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

18

lib/react-swipe.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc