Socket
Socket
Sign inDemoInstall

react-responsive-carousel

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-carousel - npm Package Compare versions

Comparing version 3.0.22 to 3.0.23

23

lib/components/Carousel.js

@@ -5,3 +5,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -39,3 +39,4 @@ var React = require('react');

swipeScrollTolerance: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]),
dynamicHeight: React.PropTypes.bool
dynamicHeight: React.PropTypes.bool,
emulateTouch: React.PropTypes.bool
},

@@ -57,3 +58,4 @@

swipeScrollTolerance: 5,
dynamicHeight: false
dynamicHeight: false,
emulateTouch: false
};

@@ -185,2 +187,10 @@ },

handleClickItem: function handleClickItem(index, item) {
if (this.state.cancelClick) {
this.selectItem({
cancelClick: false
});
return;
}
var handler = this.props.onClickItem;

@@ -223,3 +233,4 @@

this.setState({
swiping: false
swiping: false,
cancelClick: true
});

@@ -251,3 +262,3 @@ },

var position = currentPosition + 100 / (this.state.wrapperSize / handledDelta) + '%';
var position = currentPosition + 100 / (this.state.itemSize / handledDelta) + '%';

@@ -465,3 +476,3 @@ ['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {

Swipe,
_extends({ tagName: 'ul' }, swiperProps),
_extends({ tagName: 'ul' }, swiperProps, { allowMouseEvents: this.props.emulateTouch }),
this.renderItems()

@@ -468,0 +479,0 @@ )

{
"name": "react-responsive-carousel",
"version": "3.0.22",
"version": "3.0.23",
"description": "React Responsive Carousel",

@@ -88,4 +88,4 @@ "author": {

"classnames": "^2.2.5",
"react-easy-swipe": "0.0.5"
"react-easy-swipe": "0.0.8"
}
}

@@ -25,3 +25,3 @@ # React Responsive Carousel

return (
<Carousel axis="horizontal|vertical" showThumbs={true|false} showArrows={true|false} onChange={onChange} onClickItem={onClickItem} onClickThumb={onClickThumb}>
<Carousel axis="horizontal|vertical" showThumbs={true|false} showArrows={true|false} onChange={onChange} onClickItem={onClickItem} onClickThumb={onClickThumb} dynamicHeight emulateTouch>
<div>

@@ -68,3 +68,4 @@ <img src="assets/1.jpeg" />

| swipeScrollTolerance | `number` | `5` | Allows scroll when the swipe movement occurs in a different direction than the carousel axis and within the tolerance - Increase for loose - Decrease for strict |
| dynamicHeight | `boolean` | false | Adjusts the carousel height if required. -- Do not work with vertical axis --
| dynamicHeight | `boolean` | false | Adjusts the carousel height if required. -- Do not work with vertical axis -- |
| emulateTouch | `boolean` | false | Allows mouse to simulate swipe |

@@ -71,0 +72,0 @@

@@ -35,2 +35,7 @@ import React from 'react';

))
.add('emulate touch', () => (
<Carousel emulateTouch>
{ baseChildren.props.children }
</Carousel>
))
.add('no arrows', () => (

@@ -37,0 +42,0 @@ <Carousel showArrows={false}>

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