New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-multi-carousel

Package Overview
Dependencies
Maintainers
1
Versions
133
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 1.0.27 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

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