react-responsive-carousel
Advanced tools
Comparing version 3.0.19 to 3.0.20
@@ -29,5 +29,6 @@ 'use strict'; | ||
onChange: React.PropTypes.func, | ||
axis: React.PropTypes.string, | ||
axis: React.PropTypes.oneOf(['horizontal', 'vertical']), | ||
width: React.PropTypes.string, | ||
useKeyboardArrows: React.PropTypes.bool | ||
useKeyboardArrows: React.PropTypes.bool, | ||
swipeScrollTolerance: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]) | ||
}, | ||
@@ -44,3 +45,4 @@ | ||
axis: 'horizontal', | ||
useKeyboardArrows: false | ||
useKeyboardArrows: false, | ||
swipeScrollTolerance: 5 | ||
}; | ||
@@ -197,4 +199,4 @@ }, | ||
// should prevent default? | ||
return axisDelta !== 0; | ||
// allows scroll if the swipe was within the tolerance | ||
return Math.abs(axisDelta) > this.props.swipeScrollTolerance; | ||
}, | ||
@@ -201,0 +203,0 @@ decrement: function decrement(positions) { |
{ | ||
"name": "react-responsive-carousel", | ||
"version": "3.0.19", | ||
"version": "3.0.20", | ||
"description": "React Responsive Carousel", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -49,3 +49,3 @@ # React Responsive Carousel | ||
| Attributes | Type | Default | Description | | ||
| :--------- | :--: | :-----: | ----------- | | ||
| :--------- | :--: | :-----: | :----------- | | ||
| showArrows | `boolean` | `true` | show prev and next arrows | | ||
@@ -62,3 +62,4 @@ | showStatus | `boolean` | `true` | show index of the current item. i.e: (1/8) | | ||
| width | `string` | - | Allows to set a fixed width | | ||
| useKeyboardArrows | `boolean` | false | Adds support to next and prev through keyboard arrows | | ||
| useKeyboardArrows | `boolean` | `false` | Adds support to next and prev through keyboard arrows | | ||
| swipeScrollTolerance | `number` | `5` | Allows scroll when the swipe movement occurs in a different direction than the carousel axis and within the tolerance - Increase for loose - Decrease for strict | | ||
@@ -65,0 +66,0 @@ |
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
903902
1231
107