Socket
Socket
Sign inDemoInstall

react-responsive-carousel

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-carousel - npm Package Compare versions

Comparing version 3.1.39 to 3.1.40

8

CHANGELOG.md
# React Responsive Carousel
## 3.1.39 - Tue May 22 2018
* Fix typeof comparison
* Fix itemsList ref
## 3.1.38 - Mon May 21 2018

@@ -97,5 +102,2 @@ * Updating react-easy-swipe

## 3.1.25 - Sat Aug 26 2017
* issue-159: Ignoring storybook when publishing to npm
* #159: Updating css instructions
* Update README.md

@@ -102,0 +104,0 @@

@@ -91,3 +91,3 @@ 'use strict';

_this.autoPlay = function () {
if (!_this.props.autoPlay || _react.Children.count(_this.props.children) <= 1) {
if (!_this.state.autoPlay || _react.Children.count(_this.props.children) <= 1) {
return;

@@ -103,3 +103,3 @@ }

_this.clearAutoPlay = function () {
if (!_this.props.autoPlay) {
if (!_this.state.autoPlay) {
return;

@@ -299,3 +299,3 @@ }

// and will result in the interval function not being cleared correctly.
if (_this.props.autoPlay && _this.state.isMouseEntered === false) {
if (_this.state.autoPlay && _this.state.isMouseEntered === false) {
_this.resetAutoPlay();

@@ -352,3 +352,4 @@ }

hasMount: false,
isMouseEntered: false
isMouseEntered: false,
autoPlay: props.autoPlay
};

@@ -370,2 +371,4 @@ return _this;

value: function componentWillReceiveProps(nextProps) {
var _this2 = this;
if (nextProps.selectedItem !== this.state.selectedItem) {

@@ -376,8 +379,12 @@ this.updateSizes();

if (nextProps.autoPlay !== this.props.autoPlay) {
if (nextProps.autoPlay) {
this.setupAutoPlay();
} else {
this.destroyAutoPlay();
}
if (nextProps.autoPlay !== this.state.autoPlay) {
this.setState({
autoPlay: nextProps.autoPlay
}, function () {
if (_this2.state.autoPlay) {
_this2.setupAutoPlay();
} else {
_this2.destroyAutoPlay();
}
});
}

@@ -402,3 +409,3 @@ }

if (this.props.autoPlay && _react.Children.count(this.props.children) > 1) {
if (this.state.autoPlay && _react.Children.count(this.props.children) > 1) {
this.setupAutoPlay();

@@ -499,18 +506,18 @@ }

value: function renderItems() {
var _this2 = this;
var _this3 = this;
return _react.Children.map(this.props.children, function (item, index) {
var itemClass = _cssClasses2.default.ITEM(true, index === _this2.state.selectedItem);
var itemClass = _cssClasses2.default.ITEM(true, index === _this3.state.selectedItem);
var slideProps = {
ref: function ref(e) {
return _this2.setItemsRef(e, index);
return _this3.setItemsRef(e, index);
},
key: 'itemKey' + index,
className: _cssClasses2.default.ITEM(true, index === _this2.state.selectedItem),
onClick: _this2.handleClickItem.bind(_this2, index, item)
className: _cssClasses2.default.ITEM(true, index === _this3.state.selectedItem),
onClick: _this3.handleClickItem.bind(_this3, index, item)
};
if (_this2.props.centerMode && _this2.props.axis === 'horizontal') {
if (_this3.props.centerMode && _this3.props.axis === 'horizontal') {
slideProps.style = {
minWidth: _this2.props.centerSlidePercentage + '%'
minWidth: _this3.props.centerSlidePercentage + '%'
};

@@ -529,3 +536,3 @@ }

value: function renderControls() {
var _this3 = this;
var _this4 = this;

@@ -540,3 +547,3 @@ if (!this.props.showIndicators) {

_react.Children.map(this.props.children, function (item, index) {
return _react2.default.createElement('li', { className: _cssClasses2.default.DOT(index === _this3.state.selectedItem), onClick: _this3.changeItem, value: index, key: index });
return _react2.default.createElement('li', { className: _cssClasses2.default.DOT(index === _this4.state.selectedItem), onClick: _this4.changeItem, value: index, key: index });
})

@@ -543,0 +550,0 @@ );

{
"name": "react-responsive-carousel",
"version": "3.1.39",
"version": "3.1.40",
"description": "React Responsive Carousel",

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

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