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.3.14 to 1.3.15

2

lib/Carousel.js

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

var currentTransform = partialVisbile
? utils_1.getTransformForPartialVsibile(this.state, paritialVisibilityGutter)
? utils_1.getTransformForPartialVsibile(this.state, paritialVisibilityGutter, this.props)
: centerMode

@@ -458,0 +458,0 @@ ? utils_1.getTransformForCenterMode(this.state, this.props)

@@ -10,3 +10,3 @@ import { CarouselInternalState, CarouselProps } from "../types";

declare function getTransformForCenterMode(state: CarouselInternalState, props: CarouselProps): number;
declare function getTransformForPartialVsibile(state: CarouselInternalState, paritialVisibilityGutter?: number): number;
declare function getTransformForPartialVsibile(state: CarouselInternalState, paritialVisibilityGutter: number | undefined, props: CarouselProps): number;
export { getInitialState, getIfSlideIsVisbile, getTransformForCenterMode, getTransformForPartialVsibile };

@@ -36,7 +36,14 @@ "use strict";

exports.getTransformForCenterMode = getTransformForCenterMode;
function getTransformForPartialVsibile(state, paritialVisibilityGutter) {
function getTransformForPartialVsibile(state, paritialVisibilityGutter, props) {
if (paritialVisibilityGutter === void 0) { paritialVisibilityGutter = 0; }
return state.transform + state.currentSlide * paritialVisibilityGutter;
var currentSlide = state.currentSlide, totalItems = state.totalItems, slidesToShow = state.slidesToShow;
var isRightEndReach = !(currentSlide + 1 + slidesToShow <= totalItems);
var shouldRemoveRightGutter = !props.infinite && isRightEndReach;
var transform = state.transform + currentSlide * paritialVisibilityGutter;
if (shouldRemoveRightGutter) {
return transform + paritialVisibilityGutter;
}
return transform;
}
exports.getTransformForPartialVsibile = getTransformForPartialVsibile;
//# sourceMappingURL=common.js.map
{
"name": "react-multi-carousel",
"version": "1.3.14",
"version": "1.3.15",
"description": "",

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

Sorry, the diff of this file is not supported yet

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