react-responsive-carousel
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
908256
1342