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

react-swipeable

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-swipeable - npm Package Compare versions

Comparing version 3.1.0 to 3.3.0

lib/Swipeable.js

9

CHANGELOG.md

@@ -0,1 +1,10 @@

# 3.3.0
* Adds `velocity` data to `onSwiping` callback
* Updated the build process introducing ES2015 and babel
# 3.2.0
* Adds `preventDefaultTouchMoveEvent` option, defaults to true
# 3.1.0

@@ -2,0 +11,0 @@

20

package.json
{
"name": "react-swipeable",
"version": "3.1.0",
"version": "3.3.0",
"description": "Swipe bindings for react",
"main": "js/Swipeable.js",
"main": "lib/Swipeable.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build:lib": "babel src --out-dir lib",
"build:publish:examples": "./scripts/build_gh_pages.sh",
"prepublish": "npm run build:lib"
},

@@ -25,8 +27,16 @@ "keywords": [

},
"files": [
"lib",
"src"
],
"license": "MIT",
"devDependencies": {
"gulp": "^3.8.11",
"gulp-react": "^3.0.1",
"babel-cli": "^6.3.17",
"babel-preset-es2015-loose": "^6.1.4",
"babel-preset-react": "^6.3.13",
"react": ">=0.12.x"
},
"peerDependencies": {
"react": "^0.12.0 || ^15.0.0-0"
}
}

@@ -27,3 +27,4 @@ # Swipeable

onSwipedLeft={this.swipedLeft}
onSwiped={this.handleSwipeAction}>
onSwiped={this.handleSwipeAction}
preventDefaultTouchmoveEvent={false}>
<div>

@@ -38,2 +39,5 @@ This element can be swiped

#### Examples:
[http://dogfessional.github.io/react-swipeable/](http://dogfessional.github.io/react-swipeable/)
# Props

@@ -45,2 +49,4 @@

`onSwiping` in addition to the swipe delta, onSwiping also returns the current absolute X and Y position, as well as the current Velocity of the swipe. `this.props.onSwiping(e, deltaX, deltaY, absX, absY, velocity)`
`onSwipedUp`, `onSwipedRight`, `onSwipedDown`, `onSwipedLeft` calls back with the event

@@ -55,2 +61,4 @@ as well as the x distance, + or -, from where the swipe started to where it ended. These only fire at the end of a touch event.

`preventDefaultTouchmoveEvent` is whether to prevent the browser's `[touchmove](https://developer.mozilla.org/en-US/docs/Web/Events/touchmove)` event. Sometimes you would like the target to scroll natively. The default value is `true`.
### PropTypes

@@ -70,3 +78,4 @@

flickThreshold: React.PropTypes.number,
delta: React.PropTypes.number
delta: React.PropTypes.number,
preventDefaultTouchmoveEvent: React.PropTypes.bool
```

@@ -76,18 +85,14 @@

Initial set up, run:
Initial set up, run `npm install`.
```console
$ npm install
```
Make changes/updates to the `src/Swipeable.js` file. Then run `npm run build:lib` to build the final output.
For watch on files and JSX transpiling, run:
#### Test changes/updates with the examples
```console
$ gulp
```
#####Please make updates and changes to the `jsx/Swipeable.jsx`, and have gulp/babel compile the `js/Swipeable.js` file.
cd into `examples` directory, run `npm install` within that directory, and then run `npm start`.
After the server starts you can then view the examples page with your changes at `http://localhost:3000`.
# License
MIT
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