Socket
Socket
Sign inDemoInstall

react-responsive-carousel

Package Overview
Dependencies
3
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.19 to 3.1.20

LICENSE.md

8

CHANGELOG.md
# React Responsive Carousel
## 3.1.19 - Mon May 29 2017
* #131: Add story and docs about the custom formatter
* #131: Allow user to pass a custom formatter for status
* #131: Removing old unused files
## 3.1.18 - Mon May 29 2017
* #129: Allow only right and left keys when axis is horizontal

@@ -41,2 +48,3 @@

## 3.1.9 - Mon Apr 24 2017
* #98: Allow carousel slides to be lazy loaded

@@ -43,0 +51,0 @@

1

generate-changelog.js

@@ -9,2 +9,3 @@ var changelog = require('changelog');

var allowedMessages = [
'Allow',
'Add',

@@ -11,0 +12,0 @@ 'Fix',

21

lib/components/Carousel.js

@@ -167,2 +167,3 @@ 'use strict';

_this.onSwipeEnd = function () {
_this.resetPosition();
_this.setState({

@@ -175,3 +176,2 @@ swiping: false

_this.onSwipeMove = function (delta) {
var list = _reactDom2.default.findDOMNode(_this.refs.itemList);
var isHorizontal = _this.props.axis === 'horizontal';

@@ -199,5 +199,3 @@

['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {
list.style[prop] = (0, _CSSTranslate2.default)(position, _this.props.axis);
});
_this.setPosition(position);

@@ -216,2 +214,14 @@ // allows scroll if the swipe was within the tolerance

_this.resetPosition = function () {
var currentPosition = -_this.state.selectedItem * 100 + '%';
_this.setPosition(currentPosition);
};
_this.setPosition = function (position) {
var list = _reactDom2.default.findDOMNode(_this.refs.itemList);
['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {
list.style[prop] = (0, _CSSTranslate2.default)(position, _this.props.axis);
});
};
_this.decrement = function (positions) {

@@ -497,3 +507,2 @@ _this.moveTo(_this.state.selectedItem - (typeof positions === 'Number' ? positions : 1));

var currentPosition = -this.state.selectedItem * 100 + '%';
// if 3d is available, let's take advantage of the performance of transform

@@ -601,3 +610,3 @@ var transformProp = (0, _CSSTranslate2.default)(currentPosition, this.props.axis);

transitionTime: _propTypes2.default.number,
swipeScrollTolerance: _propTypes2.default.oneOfType([_propTypes2.default.number]),
swipeScrollTolerance: _propTypes2.default.number,
dynamicHeight: _propTypes2.default.bool,

@@ -604,0 +613,0 @@ emulateTouch: _propTypes2.default.bool,

{
"name": "react-responsive-carousel",
"version": "3.1.19",
"version": "3.1.20",
"description": "React Responsive Carousel",

@@ -5,0 +5,0 @@ "author": {

@@ -84,3 +84,2 @@ # React Responsive Carousel

| transitionTime | `number` | `350` | Duration of slide transitions (in miliseconds) |
| 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 |

@@ -87,0 +86,0 @@ | dynamicHeight | `boolean` | `false` | Adjusts the carousel height if required. -- Do not work with vertical axis -- |

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc