@s-ui/react-molecule-photo-uploader
Advanced tools
Comparing version 1.14.0 to 1.15.0
@@ -5,2 +5,11 @@ # Change Log | ||
# 1.15.0 (2020-06-17) | ||
### Features | ||
* fix to avoid rotation based on exif, if browser has this feature by de ([91ae59d](https://github.com/SUI-Components/sui-components/commit/91ae59d64cdf9f14c4eb2186eaca0c5645673fbe)) | ||
# 1.14.0 (2020-06-08) | ||
@@ -7,0 +16,0 @@ |
@@ -16,13 +16,21 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
getExifOrientation(file).then(function (getExifOrientationResult) { | ||
switch (getExifOrientationResult) { | ||
case (3, 4): | ||
options.rotation = 180; | ||
break; | ||
/* | ||
* Since Chrome 81, image EXIF orientation is respected by default. | ||
* Latest Safari (13.1 as of now) is also working correctly. | ||
*/ | ||
var browserAutoRotates = getComputedStyle(document.body).imageOrientation == 'from-image'; // eslint-disable-line | ||
case (5, 6): | ||
options.rotation = 90; | ||
break; | ||
if (!browserAutoRotates) { | ||
switch (getExifOrientationResult) { | ||
case (3, 4): | ||
options.rotation = 180; | ||
break; | ||
case (7, 8): | ||
options.rotation = 270; | ||
case (5, 6): | ||
options.rotation = 90; | ||
break; | ||
case (7, 8): | ||
options.rotation = 270; | ||
} | ||
} | ||
@@ -29,0 +37,0 @@ |
{ | ||
"name": "@s-ui/react-molecule-photo-uploader", | ||
"version": "1.14.0", | ||
"version": "1.15.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
71120
1167