react-spring-lightbox
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -5,2 +5,8 @@ # Changelog | ||
## [1.4.4] - 2020-03-24 | ||
### Fixed | ||
- Add orientationchange event listener for ios devices | ||
## [1.4.3] - 2020-03-23 | ||
@@ -7,0 +13,0 @@ |
@@ -146,13 +146,17 @@ 'use strict'; | ||
var handleResize = function handleResize() { | ||
setWindowSize({ | ||
width: window.innerWidth, | ||
height: window.innerHeight | ||
}); | ||
if (window.innerHeight !== windowSize.height || window.innerWidth !== windowSize.width) { | ||
setWindowSize({ | ||
width: window.innerWidth, | ||
height: window.innerHeight | ||
}); | ||
} | ||
}; // Add event listener for window resize events | ||
window.addEventListener('resize', handleResize); // Remove event listener | ||
window.addEventListener('resize', handleResize); | ||
window.addEventListener('orientationchange', handleResize); // Remove event listener | ||
return function () { | ||
window.removeEventListener('resize', handleResize); | ||
window.addEventListener('orientationchange', handleResize); | ||
}; | ||
@@ -159,0 +163,0 @@ }); |
@@ -141,13 +141,17 @@ import React, { useEffect, useState, useRef } from 'react'; | ||
var handleResize = function handleResize() { | ||
setWindowSize({ | ||
width: window.innerWidth, | ||
height: window.innerHeight | ||
}); | ||
if (window.innerHeight !== windowSize.height || window.innerWidth !== windowSize.width) { | ||
setWindowSize({ | ||
width: window.innerWidth, | ||
height: window.innerHeight | ||
}); | ||
} | ||
}; // Add event listener for window resize events | ||
window.addEventListener('resize', handleResize); // Remove event listener | ||
window.addEventListener('resize', handleResize); | ||
window.addEventListener('orientationchange', handleResize); // Remove event listener | ||
return function () { | ||
window.removeEventListener('resize', handleResize); | ||
window.addEventListener('orientationchange', handleResize); | ||
}; | ||
@@ -154,0 +158,0 @@ }); |
{ | ||
"name": "react-spring-lightbox", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "A flexible image gallery lightbox with native-feeling touch gestures and buttery smooth animations, built with react-spring.", | ||
@@ -70,3 +70,3 @@ "author": "Tim Ellenberger <timellenberger@gmail.com>", | ||
"@babel/preset-env": "^7.9.0", | ||
"@babel/preset-react": "^7.9.1", | ||
"@babel/preset-react": "^7.9.4", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
@@ -90,3 +90,3 @@ "@rollup/plugin-node-resolve": "^7.1.1", | ||
"jest": "^25.1.0", | ||
"lint-staged": "^10.0.8", | ||
"lint-staged": "^10.0.9", | ||
"prettier": "^1.19.1", | ||
@@ -93,0 +93,0 @@ "react": "^16.13.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
201761
4787
1701