Skip to content

Commit

Permalink
build: release 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Jul 10, 2019
1 parent a034294 commit abc0c2a
Show file tree
Hide file tree
Showing 12 changed files with 541 additions and 549 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## next
## 1.5.3 (Jul 10, 2019)

- Compute the size of image specially for all browsers that use WebKit as the layout engine in iOS devices, such as Safari and in-app browsers (#544).

Expand Down
20 changes: 11 additions & 9 deletions dist/cropper.common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.2
* Cropper.js v1.5.3
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:05.296Z
* Date: 2019-07-10T12:07:44.557Z
*/

'use strict';
Expand Down Expand Up @@ -3344,8 +3344,10 @@ function () {
var image = this.isImg ? this.element : this.image;
image.onload = null;
image.onerror = null;
this.sizing = true;
var IS_SAFARI = WINDOW.navigator && /^(?:.(?!chrome|android))*safari/i.test(WINDOW.navigator.userAgent);
this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices,
// such as Safari for iOS, Chrome for iOS, and in-app browsers.

var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent);

var done = function done(naturalWidth, naturalHeight) {
assign(_this2.imageData, {
Expand All @@ -3357,10 +3359,10 @@ function () {
_this2.sized = true;

_this2.build();
}; // Modern browsers (except Safari)
}; // Most modern browsers (excepts iOS WebKit)


if (image.naturalWidth && !IS_SAFARI) {
if (image.naturalWidth && !isIOSWebKit) {
done(image.naturalWidth, image.naturalHeight);
return;
}
Expand All @@ -3372,15 +3374,15 @@ function () {
sizingImage.onload = function () {
done(sizingImage.width, sizingImage.height);

if (!IS_SAFARI) {
if (!isIOSWebKit) {
body.removeChild(sizingImage);
}
};

sizingImage.src = image.src; // iOS Safari will convert the image automatically
sizingImage.src = image.src; // iOS WebKit will convert the image automatically
// with its orientation once append it into DOM (#279)

if (!IS_SAFARI) {
if (!isIOSWebKit) {
sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';
body.appendChild(sizingImage);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.2
* Cropper.js v1.5.3
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:02.389Z
* Date: 2019-07-10T12:07:41.696Z
*/

.cropper-container {
Expand Down
20 changes: 11 additions & 9 deletions dist/cropper.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.2
* Cropper.js v1.5.3
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:05.296Z
* Date: 2019-07-10T12:07:44.557Z
*/

function _typeof(obj) {
Expand Down Expand Up @@ -3342,8 +3342,10 @@ function () {
var image = this.isImg ? this.element : this.image;
image.onload = null;
image.onerror = null;
this.sizing = true;
var IS_SAFARI = WINDOW.navigator && /^(?:.(?!chrome|android))*safari/i.test(WINDOW.navigator.userAgent);
this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices,
// such as Safari for iOS, Chrome for iOS, and in-app browsers.

var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent);

var done = function done(naturalWidth, naturalHeight) {
assign(_this2.imageData, {
Expand All @@ -3355,10 +3357,10 @@ function () {
_this2.sized = true;

_this2.build();
}; // Modern browsers (except Safari)
}; // Most modern browsers (excepts iOS WebKit)


if (image.naturalWidth && !IS_SAFARI) {
if (image.naturalWidth && !isIOSWebKit) {
done(image.naturalWidth, image.naturalHeight);
return;
}
Expand All @@ -3370,15 +3372,15 @@ function () {
sizingImage.onload = function () {
done(sizingImage.width, sizingImage.height);

if (!IS_SAFARI) {
if (!isIOSWebKit) {
body.removeChild(sizingImage);
}
};

sizingImage.src = image.src; // iOS Safari will convert the image automatically
sizingImage.src = image.src; // iOS WebKit will convert the image automatically
// with its orientation once append it into DOM (#279)

if (!IS_SAFARI) {
if (!isIOSWebKit) {
sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';
body.appendChild(sizingImage);
}
Expand Down
20 changes: 11 additions & 9 deletions dist/cropper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.2
* Cropper.js v1.5.3
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:05.296Z
* Date: 2019-07-10T12:07:44.557Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -3348,8 +3348,10 @@
var image = this.isImg ? this.element : this.image;
image.onload = null;
image.onerror = null;
this.sizing = true;
var IS_SAFARI = WINDOW.navigator && /^(?:.(?!chrome|android))*safari/i.test(WINDOW.navigator.userAgent);
this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices,
// such as Safari for iOS, Chrome for iOS, and in-app browsers.

var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent);

var done = function done(naturalWidth, naturalHeight) {
assign(_this2.imageData, {
Expand All @@ -3361,10 +3363,10 @@
_this2.sized = true;

_this2.build();
}; // Modern browsers (except Safari)
}; // Most modern browsers (excepts iOS WebKit)


if (image.naturalWidth && !IS_SAFARI) {
if (image.naturalWidth && !isIOSWebKit) {
done(image.naturalWidth, image.naturalHeight);
return;
}
Expand All @@ -3376,15 +3378,15 @@
sizingImage.onload = function () {
done(sizingImage.width, sizingImage.height);

if (!IS_SAFARI) {
if (!isIOSWebKit) {
body.removeChild(sizingImage);
}
};

sizingImage.src = image.src; // iOS Safari will convert the image automatically
sizingImage.src = image.src; // iOS WebKit will convert the image automatically
// with its orientation once append it into DOM (#279)

if (!IS_SAFARI) {
if (!isIOSWebKit) {
sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';
body.appendChild(sizingImage);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/cropper.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/cropper.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/css/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.2
* Cropper.js v1.5.3
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:02.389Z
* Date: 2019-07-10T12:07:41.696Z
*/

.cropper-container {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<div class="container">
<div class="row">
<div class="col-md">
<h1>Cropper.js <small class="h6">v1.5.2</small></h1>
<h1>Cropper.js <small class="h6">v1.5.3</small></h1>
<p class="lead">JavaScript image cropper.</p>
</div>
<div class="col-md">
Expand Down
20 changes: 11 additions & 9 deletions docs/js/cropper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.2
* Cropper.js v1.5.3
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:05.296Z
* Date: 2019-07-10T12:07:44.557Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -3348,8 +3348,10 @@
var image = this.isImg ? this.element : this.image;
image.onload = null;
image.onerror = null;
this.sizing = true;
var IS_SAFARI = WINDOW.navigator && /^(?:.(?!chrome|android))*safari/i.test(WINDOW.navigator.userAgent);
this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices,
// such as Safari for iOS, Chrome for iOS, and in-app browsers.

var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent);

var done = function done(naturalWidth, naturalHeight) {
assign(_this2.imageData, {
Expand All @@ -3361,10 +3363,10 @@
_this2.sized = true;

_this2.build();
}; // Modern browsers (except Safari)
}; // Most modern browsers (excepts iOS WebKit)


if (image.naturalWidth && !IS_SAFARI) {
if (image.naturalWidth && !isIOSWebKit) {
done(image.naturalWidth, image.naturalHeight);
return;
}
Expand All @@ -3376,15 +3378,15 @@
sizingImage.onload = function () {
done(sizingImage.width, sizingImage.height);

if (!IS_SAFARI) {
if (!isIOSWebKit) {
body.removeChild(sizingImage);
}
};

sizingImage.src = image.src; // iOS Safari will convert the image automatically
sizingImage.src = image.src; // iOS WebKit will convert the image automatically
// with its orientation once append it into DOM (#279)

if (!IS_SAFARI) {
if (!isIOSWebKit) {
sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';
body.appendChild(sizingImage);
}
Expand Down
Loading

0 comments on commit abc0c2a

Please sign in to comment.