Skip to content

Commit

Permalink
build: release 1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed May 20, 2018
1 parent 665cc77 commit 1b1a0c0
Show file tree
Hide file tree
Showing 12 changed files with 4,713 additions and 5,362 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.3.6 (May 20, 2018)

- Check orientation only when both the `rotatable` and `scalable` options are set to `true`.
- In case rounding off leads to extra 1px in right or bottom border we should round the top-left corner and the dimension (#343).

## 1.3.5 (Apr 15, 2018)

- Ensure the cloned image loads completely before trigger the `ready` event to avoid side effect (#303).
Expand Down
27 changes: 21 additions & 6 deletions dist/cropper.common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.3.5
* https://github.com/fengyuanchen/cropperjs
* Cropper.js v1.3.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright (c) 2015-2018 Chen Fengyuan
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-15T06:20:44.574Z
* Date: 2018-05-20T07:58:21.682Z
*/

'use strict';
Expand Down Expand Up @@ -2817,9 +2817,20 @@ var methods = {
var ratio = imageData.width / imageData.naturalWidth;

forEach(data, function (n, i) {
n /= ratio;
data[i] = rounded ? Math.round(n) : n;
data[i] = n / ratio;
});

if (rounded) {
// In case rounding off leads to extra 1px in right or bottom border
// we should round the top-left corner and the dimension (#343).
var bottom = Math.round(data.y + data.height);
var right = Math.round(data.x + data.width);

data.x = Math.round(data.x);
data.y = Math.round(data.y);
data.width = right - data.x;
data.height = bottom - data.y;
}
} else {
data = {
x: 0,
Expand Down Expand Up @@ -3329,6 +3340,10 @@ var Cropper = function () {
options = this.options;


if (!options.rotatable && !options.scalable) {
options.checkOrientation = false;
}

if (!options.checkOrientation || !window.ArrayBuffer) {
this.clone();
return;
Expand Down
8 changes: 4 additions & 4 deletions dist/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.3.5
* https://github.com/fengyuanchen/cropperjs
* Cropper.js v1.3.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright (c) 2015-2018 Chen Fengyuan
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-15T06:19:56.029Z
* Date: 2018-05-20T07:56:44.346Z
*/

.cropper-container {
Expand Down
27 changes: 21 additions & 6 deletions dist/cropper.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.3.5
* https://github.com/fengyuanchen/cropperjs
* Cropper.js v1.3.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright (c) 2015-2018 Chen Fengyuan
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-15T06:20:44.574Z
* Date: 2018-05-20T07:58:21.682Z
*/

var IN_BROWSER = typeof window !== 'undefined';
Expand Down Expand Up @@ -2815,9 +2815,20 @@ var methods = {
var ratio = imageData.width / imageData.naturalWidth;

forEach(data, function (n, i) {
n /= ratio;
data[i] = rounded ? Math.round(n) : n;
data[i] = n / ratio;
});

if (rounded) {
// In case rounding off leads to extra 1px in right or bottom border
// we should round the top-left corner and the dimension (#343).
var bottom = Math.round(data.y + data.height);
var right = Math.round(data.x + data.width);

data.x = Math.round(data.x);
data.y = Math.round(data.y);
data.width = right - data.x;
data.height = bottom - data.y;
}
} else {
data = {
x: 0,
Expand Down Expand Up @@ -3327,6 +3338,10 @@ var Cropper = function () {
options = this.options;


if (!options.rotatable && !options.scalable) {
options.checkOrientation = false;
}

if (!options.checkOrientation || !window.ArrayBuffer) {
this.clone();
return;
Expand Down
27 changes: 21 additions & 6 deletions dist/cropper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.3.5
* https://github.com/fengyuanchen/cropperjs
* Cropper.js v1.3.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright (c) 2015-2018 Chen Fengyuan
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-15T06:20:44.574Z
* Date: 2018-05-20T07:58:21.682Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -2821,9 +2821,20 @@
var ratio = imageData.width / imageData.naturalWidth;

forEach(data, function (n, i) {
n /= ratio;
data[i] = rounded ? Math.round(n) : n;
data[i] = n / ratio;
});

if (rounded) {
// In case rounding off leads to extra 1px in right or bottom border
// we should round the top-left corner and the dimension (#343).
var bottom = Math.round(data.y + data.height);
var right = Math.round(data.x + data.width);

data.x = Math.round(data.x);
data.y = Math.round(data.y);
data.width = right - data.x;
data.height = bottom - data.y;
}
} else {
data = {
x: 0,
Expand Down Expand Up @@ -3333,6 +3344,10 @@
options = this.options;


if (!options.rotatable && !options.scalable) {
options.checkOrientation = false;
}

if (!options.checkOrientation || !window.ArrayBuffer) {
this.clone();
return;
Expand Down
8 changes: 4 additions & 4 deletions dist/cropper.min.css

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

10 changes: 5 additions & 5 deletions dist/cropper.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/css/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.3.5
* https://github.com/fengyuanchen/cropperjs
* Cropper.js v1.3.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright (c) 2015-2018 Chen Fengyuan
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-15T06:19:56.029Z
* Date: 2018-05-20T07:56:44.346Z
*/

.cropper-container {
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="author" content="Chen Fengyuan">
<title>Cropper.js</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="css/cropper.css">
<link rel="stylesheet" href="css/main.css">
</head>
Expand Down Expand Up @@ -46,7 +46,7 @@
<div class="container">
<div class="row">
<div class="col-md">
<h1>Cropper.js <small class="h6">v1.3.5</small></h1>
<h1>Cropper.js <small class="h6">v1.3.6</small></h1>
<p class="lead">JavaScript image cropper.</p>
</div>
<div class="col-md">
Expand Down Expand Up @@ -569,7 +569,7 @@ <h5 class="modal-title" id="getCroppedCanvasTitle">Cropped</h5>

<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.bundle.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script>
<script src="https://fengyuanchen.github.io/js/common.js"></script>
<script src="js/cropper.js"></script>
<script src="js/main.js"></script>
Expand Down
27 changes: 21 additions & 6 deletions docs/js/cropper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.3.5
* https://github.com/fengyuanchen/cropperjs
* Cropper.js v1.3.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright (c) 2015-2018 Chen Fengyuan
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-04-15T06:20:44.574Z
* Date: 2018-05-20T07:58:21.682Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -2821,9 +2821,20 @@
var ratio = imageData.width / imageData.naturalWidth;

forEach(data, function (n, i) {
n /= ratio;
data[i] = rounded ? Math.round(n) : n;
data[i] = n / ratio;
});

if (rounded) {
// In case rounding off leads to extra 1px in right or bottom border
// we should round the top-left corner and the dimension (#343).
var bottom = Math.round(data.y + data.height);
var right = Math.round(data.x + data.width);

data.x = Math.round(data.x);
data.y = Math.round(data.y);
data.width = right - data.x;
data.height = bottom - data.y;
}
} else {
data = {
x: 0,
Expand Down Expand Up @@ -3333,6 +3344,10 @@
options = this.options;


if (!options.rotatable && !options.scalable) {
options.checkOrientation = false;
}

if (!options.checkOrientation || !window.ArrayBuffer) {
this.clone();
return;
Expand Down
Loading

0 comments on commit 1b1a0c0

Please sign in to comment.