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.1.5 to 3.1.6

yarn.lock

36

lib/components/Carousel.js

@@ -5,4 +5,2 @@ '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 && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var React = require('react');

@@ -373,24 +371,16 @@ var ReactDOM = require('react-dom');

if (this.state.hasMount && this['item' + position].getElementsByTagName('img').length > 0) {
var _ret = function () {
var image = _this5['item' + position].getElementsByTagName('img')[0];
var image = this['item' + position].getElementsByTagName('img')[0];
if (!image.complete) {
(function () {
// if the image is still loading, the size won't be available so we trigger a new render after it's done
var onImageLoad = function onImageLoad() {
_this5.forceUpdate();
image.removeEventListener('load', onImageLoad);
};
if (!image.complete) {
// if the image is still loading, the size won't be available so we trigger a new render after it's done
var onImageLoad = function onImageLoad() {
_this5.forceUpdate();
image.removeEventListener('load', onImageLoad);
};
image.addEventListener('load', onImageLoad);
})();
}
image.addEventListener('load', onImageLoad);
}
var height = _this5['item' + position].getElementsByTagName('img')[0].clientHeight;
return {
v: height > 0 ? height : null
};
}();
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
var height = this['item' + position].getElementsByTagName('img')[0].clientHeight;
return height > 0 ? height : null;
}

@@ -414,5 +404,5 @@

// show left arrow?
var hasPrev = canShowArrows && this.state.selectedItem > 0 || this.props.infiniteLoop;
var hasPrev = canShowArrows && (this.state.selectedItem > 0 || this.props.infiniteLoop);
// show right arrow
var hasNext = canShowArrows && this.state.selectedItem < itemsLength - 1 || this.props.infiniteLoop;
var hasNext = canShowArrows && (this.state.selectedItem < itemsLength - 1 || this.props.infiniteLoop);
// obj to hold the transformations and styles

@@ -419,0 +409,0 @@ var itemListStyles = {};

{
"name": "react-responsive-carousel",
"version": "3.1.5",
"version": "3.1.6",
"description": "React Responsive Carousel",

@@ -5,0 +5,0 @@ "author": {

@@ -50,2 +50,12 @@ import React from 'react';

))
.add('no arrows + infinite loop + auto play', () => (
<Carousel showArrows={false} infiniteLoop autoPlay>
{ baseChildren.props.children }
</Carousel>
))
.add('no arrows + infinite loop + emulateTouch', () => (
<Carousel showArrows={false} infiniteLoop emulateTouch>
{ baseChildren.props.children }
</Carousel>
))
.add('no status', () => (

@@ -52,0 +62,0 @@ <Carousel showStatus={false}>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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