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.11 to 1.0.12

32

lib/Carousel.js

@@ -144,3 +144,3 @@ "use strict";

const { slidesToShow } = this.state;
const { slidesToSlide } = this.props;
const { slidesToSlide, infinite } = this.props;
if (this.state.currentSlide + 1 + slidesToShow <= this.state.totalItems) {

@@ -154,3 +154,5 @@ this.setState({

else {
this.resetAllItems();
if (infinite) {
this.resetAllItems();
}
}

@@ -160,3 +162,3 @@ }

const { slidesToShow } = this.state;
const { slidesToSlide } = this.props;
const { slidesToSlide, infinite } = this.props;
if (this.state.currentSlide - slidesToSlide >= 0) {

@@ -170,7 +172,9 @@ this.setState({

else {
this.setState({
transform: `translate3d(-${this.state.itemWidth *
(this.state.totalItems - slidesToShow)}px,0,0)`,
currentSlide: this.state.totalItems - slidesToShow
});
if (infinite) {
this.setState({
transform: `translate3d(-${this.state.itemWidth *
(this.state.totalItems - slidesToShow)}px,0,0)`,
currentSlide: this.state.totalItems - slidesToShow
});
}
}

@@ -206,3 +210,3 @@ }

return React.cloneElement(customLeftArrow, {
onClick: disableLeftArrow ? () => { } : () => this.previous()
onClick: () => this.previous()
});

@@ -213,3 +217,3 @@ }

// @ts-ignore
style: style_1.leftArrowStyle, onClick: disableLeftArrow ? () => { } : () => this.previous() }));
style: style_1.leftArrowStyle, onClick: () => this.previous() }));
}

@@ -220,3 +224,3 @@ };

return React.cloneElement(customRightArrow, {
onClick: disableRightArrow ? () => { } : () => this.next()
onClick: () => this.next()
});

@@ -227,7 +231,7 @@ }

// @ts-ignore
style: style_1.rightArrowStyle, onClick: disableRightArrow ? () => { } : () => this.next() }));
style: style_1.rightArrowStyle, onClick: () => this.next() }));
}
};
return (React.createElement("div", { className: containerClassName, style: style_1.containerStyle },
shouldShowArrows && React.createElement(LeftArrow, null),
shouldShowArrows && !disableLeftArrow && React.createElement(LeftArrow, null),
React.createElement("div", { className: contentClassName, style: style_1.contentStyle }, React.Children.toArray(children).map((child, index) => (React.createElement("div", { key: index, ref: this.itemRef, onMouseMove: this.handleMouseMove, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp, onTouchStart: this.handleTouchStart, onTouchMove: this.handleTouchMove, onTouchEnd: this.handleTouchEnd, style: {

@@ -238,3 +242,3 @@ transition: transition || "all 0.2s",

}, className: itemClassName }, child)))),
shouldShowArrows && React.createElement(RightArrow, null)));
shouldShowArrows && !disableRightArrow && React.createElement(RightArrow, null)));
}

@@ -241,0 +245,0 @@ }

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