Huge News!Announcing our $40M Series B led by Abstract Ventures.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.25 to 1.0.26

14

lib/Carousel.js

@@ -15,4 +15,4 @@ "use strict";

const utils_1 = require("./utils");
const defaultTransitionDuration = 300;
const defaultTransition = "transform ease-in-out 300ms";
const defaultTransitionDuration = 500;
const defaultTransition = "transform 500ms ease-in-out";
class Container extends React.Component {

@@ -164,3 +164,4 @@ constructor(props) {

this.state.totalItems - this.state.slidesToShow;
if (Math.abs(nextTranslate) <= translateXLimit || (isLastSlide && this.props.infinite)) {
if (Math.abs(nextTranslate) <= translateXLimit ||
(isLastSlide && this.props.infinite)) {
this.setState({ transform: nextTranslate });

@@ -185,8 +186,9 @@ }

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

@@ -193,0 +195,0 @@ this.resetMoveStatus();

{
"name": "react-multi-carousel",
"version": "1.0.25",
"version": "1.0.26",
"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