You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-multi-carousel

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-multi-carousel - npm Package Compare versions

Comparing version

to
1.0.28

26

lib/Carousel.js

@@ -108,2 +108,12 @@ "use strict";

}
else if (slidesHavePassed > 0 &&
this.state.currentSlide + 1 + slidesToShow <= this.state.totalItems) {
// prevent over sliding;
const maxSlides = this.state.totalItems - slidesToShow;
const maxPosition = -(this.state.itemWidth * maxSlides);
this.setState({
transform: maxPosition,
currentSlide: maxSlides
});
}
else {

@@ -128,2 +138,10 @@ if (infinite) {

}
else if (slidesHavePassed > 0 &&
this.state.currentSlide - slidesToSlide >= 0) {
// prevent oversliding.
this.setState({
transform: 0,
currentSlide: 0
});
}
else {

@@ -195,7 +213,7 @@ const maxSlides = this.state.totalItems - slidesToShow;

1;
this.next(hasTravel === 0 || hasTravel === 1 ? 0 : hasTravel - 1);
this.next(hasTravel);
}
if (e.pageX > this.initialPosition) {
const hasTravel = Math.round((e.pageX - this.initialPosition) / this.state.itemWidth);
this.previous(hasTravel === 0 || hasTravel === 1 ? 0 : hasTravel - 1);
this.previous(hasTravel);
}

@@ -249,7 +267,7 @@ this.resetMoveStatus();

const hasTravel = Math.round((this.initialPosition - this.lastPosition) / this.state.itemWidth);
this.next(hasTravel === 1 ? 0 : hasTravel - 1);
this.next(hasTravel);
}
if (this.direction === "left") {
const hasTravel = Math.round((this.lastPosition - this.initialPosition) / this.state.itemWidth);
this.previous(hasTravel === 1 ? 0 : hasTravel - 1);
this.previous(hasTravel);
}

@@ -256,0 +274,0 @@ this.resetMoveStatus();

2

package.json
{
"name": "react-multi-carousel",
"version": "1.0.27",
"version": "1.0.28",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet