@uppy/thumbnail-generator
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -16,2 +16,4 @@ "use strict"; | ||
const exifr = require('exifr/dist/mini.legacy.umd.js'); | ||
const locale = require('./locale'); | ||
/** | ||
@@ -99,7 +101,3 @@ * The Thumbnail Generator plugin | ||
this.thumbnailType = this.opts.thumbnailType || 'image/jpeg'; | ||
this.defaultLocale = { | ||
strings: { | ||
generatingThumbnails: 'Generating thumbnails...' | ||
} | ||
}; | ||
this.defaultLocale = locale; | ||
const defaultOptions = { | ||
@@ -145,3 +143,4 @@ thumbnailWidth: null, | ||
const orientationPromise = exifr.rotation(file.data).catch(() => 1); | ||
return Promise.all([onload, orientationPromise]).then(([image, orientation]) => { | ||
return Promise.all([onload, orientationPromise]).then(_ref => { | ||
let [image, orientation] = _ref; | ||
const dimensions = this.getProportionalDimensions(image, targetWidth, targetHeight, orientation.deg); | ||
@@ -408,2 +407,2 @@ const rotatedImage = this.rotateImage(image, orientation); | ||
}, _class.VERSION = "2.0.5", _temp); | ||
}, _class.VERSION = "2.0.6", _temp); |
{ | ||
"name": "@uppy/thumbnail-generator", | ||
"description": "Uppy plugin that generates small previews of images to show on your upload UI.", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^4.0.3", | ||
"@uppy/utils": "^4.0.4", | ||
"exifr": "^6.0.0" | ||
@@ -33,5 +33,4 @@ }, | ||
"peerDependencies": { | ||
"@uppy/core": "^2.0.0" | ||
}, | ||
"gitHead": "b8b4127bd55b8e7395889048407c074fce944295" | ||
} | ||
"@uppy/core": "^2.1.3" | ||
} | ||
} |
@@ -7,2 +7,4 @@ const { UIPlugin } = require('@uppy/core') | ||
const locale = require('./locale') | ||
/** | ||
@@ -25,7 +27,3 @@ * The Thumbnail Generator plugin | ||
this.defaultLocale = { | ||
strings: { | ||
generatingThumbnails: 'Generating thumbnails...', | ||
}, | ||
} | ||
this.defaultLocale = locale | ||
@@ -32,0 +30,0 @@ const defaultOptions = { |
@@ -230,3 +230,3 @@ const { UIPlugin } = require('@uppy/core') | ||
plugin.opts.thumbnailWidth, | ||
plugin.opts.thumbnailHeight | ||
plugin.opts.thumbnailHeight, | ||
) | ||
@@ -233,0 +233,0 @@ }) |
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
71246
14
1198
Updated@uppy/utils@^4.0.4