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.20 to 1.3.21

1

lib/Carousel.d.ts

@@ -30,2 +30,3 @@ import * as React from "react";

isInThrottle?: boolean;
initialY: number;
constructor(props: CarouselProps);

@@ -32,0 +33,0 @@ setIsInThrottle(isInThrottle?: boolean): void;

14

lib/Carousel.js

@@ -66,2 +66,3 @@ "use strict";

_this.direction = "";
_this.initialY = 0;
_this.isInThrottle = false;

@@ -295,2 +296,3 @@ return _this;

this.direction = "";
this.initialY = 0;
};

@@ -303,5 +305,6 @@ Carousel.prototype.handleDown = function (e) {

}
var clientX = (e.touches ? e.touches[0] : e).clientX;
var _a = e.touches ? e.touches[0] : e, clientX = _a.clientX, clientY = _a.clientY;
this.onMove = true;
this.initialPosition = clientX;
this.initialY = clientY;
this.lastPosition = clientX;

@@ -315,3 +318,5 @@ this.isAnimationAllowed = false;

}
var clientX = (e.touches ? e.touches[0] : e).clientX;
var _a = e.touches ? e.touches[0] : e, clientX = _a.clientX, clientY = _a.clientY;
var diffX = this.initialPosition - clientX;
var diffY = this.initialY - clientY;
if (e.touches && this.autoPlay && this.props.autoPlay) {

@@ -322,3 +327,6 @@ clearInterval(this.autoPlay);

if (this.onMove) {
var _a = utils_1.populateSlidesOnMouseTouchMove(this.state, this.props, this.initialPosition, this.lastPosition, clientX), direction = _a.direction, nextPosition = _a.nextPosition, canContinue = _a.canContinue;
if (!(Math.abs(diffX) > Math.abs(diffY))) {
return;
}
var _b = utils_1.populateSlidesOnMouseTouchMove(this.state, this.props, this.initialPosition, this.lastPosition, clientX), direction = _b.direction, nextPosition = _b.nextPosition, canContinue = _b.canContinue;
if (direction) {

@@ -325,0 +333,0 @@ this.direction = direction;

{
"name": "react-multi-carousel",
"private": false,
"version": "1.3.20",
"version": "1.3.21",
"description": "Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering) with typescript.",

@@ -6,0 +6,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