diff options
author | Mario <mario@mariovavti.com> | 2020-06-13 12:01:27 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-06-13 12:01:27 +0000 |
commit | a88233a045679f3d7ea4c14eb68e62816fb10ba7 (patch) | |
tree | f9a1b74fe1d9363b5b66e816992a22d75257fc5b /vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js | |
parent | 0259130cf32fee40981bd0eef6fedd9440782061 (diff) | |
download | volse-hubzilla-a88233a045679f3d7ea4c14eb68e62816fb10ba7.tar.gz volse-hubzilla-a88233a045679f3d7ea4c14eb68e62816fb10ba7.tar.bz2 volse-hubzilla-a88233a045679f3d7ea4c14eb68e62816fb10ba7.zip |
composer update jquery-file-upload
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js index 859846103..c2056b954 100644 --- a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js +++ b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js @@ -52,7 +52,6 @@ disableImageHead: '@', disableMetaDataParsers: '@', disableExif: '@', - disableExifThumbnail: '@', disableExifOffsets: '@', includeExifTags: '@', excludeExifTags: '@', @@ -216,31 +215,23 @@ }, thumbnail, thumbnailBlob; - if (data.exif) { - if (options.orientation === true) { + if (data.exif && options.thumbnail) { + thumbnail = data.exif.get('Thumbnail'); + thumbnailBlob = thumbnail && thumbnail.get('Blob'); + if (thumbnailBlob) { options.orientation = data.exif.get('Orientation'); + loadImage(thumbnailBlob, resolve, options); + return dfd.promise(); } - if (options.thumbnail) { - thumbnail = data.exif.get('Thumbnail'); - thumbnailBlob = thumbnail && thumbnail.get('Blob'); - if (thumbnailBlob) { - loadImage(thumbnailBlob, resolve, options); - return dfd.promise(); - } - } - // Prevent orienting browser oriented images: - if (loadImage.orientation) { - data.orientation = data.orientation || options.orientation; - } + } + if (data.orientation) { // Prevent orienting the same image twice: - if (data.orientation) { - delete options.orientation; - } else { - data.orientation = options.orientation; - } + delete options.orientation; + } else { + data.orientation = options.orientation || loadImage.orientation; } if (img) { - resolve(loadImage.scale(img, options)); + resolve(loadImage.scale(img, options, data)); return dfd.promise(); } return data; @@ -320,7 +311,7 @@ file = data.files[data.index], // eslint-disable-next-line new-cap dfd = $.Deferred(); - if (data.orientation && data.exifOffsets) { + if (data.orientation === true && data.exifOffsets) { // Reset Exif Orientation data: loadImage.writeExifData(data.imageHead, data, 'Orientation', 1); } |