react-animated-slider
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -342,6 +342,10 @@ module.exports = | ||
} | ||
if (_this3.currentElementStartPosition < _this3.currentElementPosition) { | ||
_this3.previous(); | ||
} else { | ||
_this3.next(); | ||
var touchDelta = _this3.currentElementStartPosition - _this3.currentElementPosition; | ||
var minSwipeOffset = _this3.props.minSwipeOffset || 15; | ||
if (Math.abs(touchDelta) > minSwipeOffset) { | ||
if (touchDelta < 0) { | ||
_this3.previous(); | ||
} else { | ||
_this3.next(); | ||
} | ||
} | ||
@@ -348,0 +352,0 @@ }; |
{ | ||
"name": "react-animated-slider", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Animated slider component for react", | ||
@@ -15,4 +15,18 @@ "main": "build/index.js", | ||
}, | ||
"keywords": [ | ||
"react", | ||
"component", | ||
"slider", | ||
"gallery", | ||
"slideshow", | ||
"react-component", | ||
"react-slider", | ||
"react-gallery", | ||
"react-slideshow", | ||
"image slider", | ||
"image gallery", | ||
"animations" | ||
], | ||
"author": "Erich Behrens <me@eb1.it>", | ||
"license": "", | ||
"license": "MIT", | ||
"bugs": { | ||
@@ -19,0 +33,0 @@ "url": "https://github.com/erichbehrens/react-animated-slider/issues" |
@@ -15,2 +15,3 @@ # react-animated-slider | ||
## Features: | ||
- Ready to use slider component with animations | ||
@@ -45,3 +46,5 @@ - Easy customization | ||
``` | ||
## Properties: | ||
**slideIndex** - `number`, default `0` | ||
@@ -63,2 +66,6 @@ | ||
**minSwipeOffset** - `number`, default `15`(px) | ||
Minimum distance to swipe for triggering a navigation event | ||
**previousButton** - `ReactElement`, default `string "previous"` | ||
@@ -65,0 +72,0 @@ |
@@ -190,6 +190,10 @@ import React from 'react'; | ||
} | ||
if (this.currentElementStartPosition < this.currentElementPosition) { | ||
this.previous(); | ||
} else { | ||
this.next(); | ||
const touchDelta = this.currentElementStartPosition - this.currentElementPosition; | ||
const minSwipeOffset = this.props.minSwipeOffset || 15; | ||
if (Math.abs(touchDelta) > minSwipeOffset) { | ||
if (touchDelta < 0) { | ||
this.previous(); | ||
} else { | ||
this.next(); | ||
} | ||
} | ||
@@ -196,0 +200,0 @@ }; |
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 2 instances in 1 package
252393
17
0
862
114