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.0 to 3.1.1

2

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 && obj !== Symbol.prototype ? "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 ? "symbol" : typeof obj; };

@@ -8,0 +8,0 @@ var React = require('react');

@@ -44,9 +44,2 @@ 'use strict';

},
componentWillMount: function componentWillMount() {
// as the widths are calculated, we need to resize
// the carousel when the window is resized
window.addEventListener("resize", this.updateStatics);
// issue #2 - image loading smaller
window.addEventListener("DOMContentLoaded", this.updateStatics);
},
componentWillUnmount: function componentWillUnmount() {

@@ -58,8 +51,14 @@ // removing listeners

componentDidMount: function componentDidMount(nextProps) {
// as the widths are calculated, we need to resize
// the carousel when the window is resized
window.addEventListener("resize", this.updateStatics);
// issue #2 - image loading smaller
window.addEventListener("DOMContentLoaded", this.updateStatics);
var defaultImg = ReactDOM.findDOMNode(this.thumb0).getElementsByTagName('img')[0];
defaultImg.addEventListener('load', this.setMountState);
// when the component is rendered we need to calculate
// the container size to adjust the responsive behaviour
this.updateStatics();
var defaultImg = ReactDOM.findDOMNode(this.thumb0).getElementsByTagName('img')[0];
defaultImg.addEventListener('load', this.setMountState);
},

@@ -66,0 +65,0 @@ updateStatics: function updateStatics() {

{
"name": "react-responsive-carousel",
"version": "3.1.0",
"version": "3.1.1",
"description": "React Responsive Carousel",

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

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