Skip to content

Commit 803f928

Browse files
committed
build: release 1.5.12
1 parent d6eb59a commit 803f928

File tree

12 files changed

+3600
-3863
lines changed

12 files changed

+3600
-3863
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## next
3+
## 1.5.12 (Jun 12, 2021)
44

55
- Fix the cropper responsive when only the height was changed (#835).
66

dist/cropper.common.js

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,53 @@
11
/*!
2-
* Cropper.js v1.5.11
2+
* Cropper.js v1.5.12
33
* https://fengyuanchen.github.io/cropperjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2021-02-17T11:53:27.572Z
8+
* Date: 2021-06-12T08:00:17.411Z
99
*/
1010

1111
'use strict';
1212

13+
function ownKeys(object, enumerableOnly) {
14+
var keys = Object.keys(object);
15+
16+
if (Object.getOwnPropertySymbols) {
17+
var symbols = Object.getOwnPropertySymbols(object);
18+
19+
if (enumerableOnly) {
20+
symbols = symbols.filter(function (sym) {
21+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
22+
});
23+
}
24+
25+
keys.push.apply(keys, symbols);
26+
}
27+
28+
return keys;
29+
}
30+
31+
function _objectSpread2(target) {
32+
for (var i = 1; i < arguments.length; i++) {
33+
var source = arguments[i] != null ? arguments[i] : {};
34+
35+
if (i % 2) {
36+
ownKeys(Object(source), true).forEach(function (key) {
37+
_defineProperty(target, key, source[key]);
38+
});
39+
} else if (Object.getOwnPropertyDescriptors) {
40+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
41+
} else {
42+
ownKeys(Object(source)).forEach(function (key) {
43+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
44+
});
45+
}
46+
}
47+
48+
return target;
49+
}
50+
1351
function _typeof(obj) {
1452
"@babel/helpers - typeof";
1553

@@ -63,40 +101,6 @@ function _defineProperty(obj, key, value) {
63101
return obj;
64102
}
65103

66-
function ownKeys(object, enumerableOnly) {
67-
var keys = Object.keys(object);
68-
69-
if (Object.getOwnPropertySymbols) {
70-
var symbols = Object.getOwnPropertySymbols(object);
71-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
72-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
73-
});
74-
keys.push.apply(keys, symbols);
75-
}
76-
77-
return keys;
78-
}
79-
80-
function _objectSpread2(target) {
81-
for (var i = 1; i < arguments.length; i++) {
82-
var source = arguments[i] != null ? arguments[i] : {};
83-
84-
if (i % 2) {
85-
ownKeys(Object(source), true).forEach(function (key) {
86-
_defineProperty(target, key, source[key]);
87-
});
88-
} else if (Object.getOwnPropertyDescriptors) {
89-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
90-
} else {
91-
ownKeys(Object(source)).forEach(function (key) {
92-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
93-
});
94-
}
95-
}
96-
97-
return target;
98-
}
99-
100104
function _toConsumableArray(arr) {
101105
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
102106
}
@@ -106,7 +110,7 @@ function _arrayWithoutHoles(arr) {
106110
}
107111

108112
function _iterableToArray(iter) {
109-
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
113+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
110114
}
111115

112116
function _unsupportedIterableToArray(o, minLen) {
@@ -1812,9 +1816,11 @@ var handlers = {
18121816
var options = this.options,
18131817
container = this.container,
18141818
containerData = this.containerData;
1815-
var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed
1819+
var ratioX = container.offsetWidth / containerData.width;
1820+
var ratioY = container.offsetHeight / containerData.height;
1821+
var ratio = Math.abs(ratioX - 1) > Math.abs(ratioY - 1) ? ratioX : ratioY; // Resize when width changed or height changed
18161822

1817-
if (ratio !== 1 || container.offsetHeight !== containerData.height) {
1823+
if (ratio !== 1) {
18181824
var canvasData;
18191825
var cropBoxData;
18201826

dist/cropper.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Cropper.js v1.5.11
2+
* Cropper.js v1.5.12
33
* https://fengyuanchen.github.io/cropperjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2021-02-17T11:53:21.992Z
8+
* Date: 2021-06-12T08:00:11.623Z
99
*/
1010

1111
.cropper-container {

dist/cropper.esm.js

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,51 @@
11
/*!
2-
* Cropper.js v1.5.11
2+
* Cropper.js v1.5.12
33
* https://fengyuanchen.github.io/cropperjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2021-02-17T11:53:27.572Z
8+
* Date: 2021-06-12T08:00:17.411Z
99
*/
1010

11+
function ownKeys(object, enumerableOnly) {
12+
var keys = Object.keys(object);
13+
14+
if (Object.getOwnPropertySymbols) {
15+
var symbols = Object.getOwnPropertySymbols(object);
16+
17+
if (enumerableOnly) {
18+
symbols = symbols.filter(function (sym) {
19+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
20+
});
21+
}
22+
23+
keys.push.apply(keys, symbols);
24+
}
25+
26+
return keys;
27+
}
28+
29+
function _objectSpread2(target) {
30+
for (var i = 1; i < arguments.length; i++) {
31+
var source = arguments[i] != null ? arguments[i] : {};
32+
33+
if (i % 2) {
34+
ownKeys(Object(source), true).forEach(function (key) {
35+
_defineProperty(target, key, source[key]);
36+
});
37+
} else if (Object.getOwnPropertyDescriptors) {
38+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
39+
} else {
40+
ownKeys(Object(source)).forEach(function (key) {
41+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
42+
});
43+
}
44+
}
45+
46+
return target;
47+
}
48+
1149
function _typeof(obj) {
1250
"@babel/helpers - typeof";
1351

@@ -61,40 +99,6 @@ function _defineProperty(obj, key, value) {
6199
return obj;
62100
}
63101

64-
function ownKeys(object, enumerableOnly) {
65-
var keys = Object.keys(object);
66-
67-
if (Object.getOwnPropertySymbols) {
68-
var symbols = Object.getOwnPropertySymbols(object);
69-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
70-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
71-
});
72-
keys.push.apply(keys, symbols);
73-
}
74-
75-
return keys;
76-
}
77-
78-
function _objectSpread2(target) {
79-
for (var i = 1; i < arguments.length; i++) {
80-
var source = arguments[i] != null ? arguments[i] : {};
81-
82-
if (i % 2) {
83-
ownKeys(Object(source), true).forEach(function (key) {
84-
_defineProperty(target, key, source[key]);
85-
});
86-
} else if (Object.getOwnPropertyDescriptors) {
87-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
88-
} else {
89-
ownKeys(Object(source)).forEach(function (key) {
90-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
91-
});
92-
}
93-
}
94-
95-
return target;
96-
}
97-
98102
function _toConsumableArray(arr) {
99103
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
100104
}
@@ -104,7 +108,7 @@ function _arrayWithoutHoles(arr) {
104108
}
105109

106110
function _iterableToArray(iter) {
107-
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
111+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
108112
}
109113

110114
function _unsupportedIterableToArray(o, minLen) {
@@ -1810,9 +1814,11 @@ var handlers = {
18101814
var options = this.options,
18111815
container = this.container,
18121816
containerData = this.containerData;
1813-
var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed
1817+
var ratioX = container.offsetWidth / containerData.width;
1818+
var ratioY = container.offsetHeight / containerData.height;
1819+
var ratio = Math.abs(ratioX - 1) > Math.abs(ratioY - 1) ? ratioX : ratioY; // Resize when width changed or height changed
18141820

1815-
if (ratio !== 1 || container.offsetHeight !== containerData.height) {
1821+
if (ratio !== 1) {
18161822
var canvasData;
18171823
var cropBoxData;
18181824

dist/cropper.js

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Cropper.js v1.5.11
2+
* Cropper.js v1.5.12
33
* https://fengyuanchen.github.io/cropperjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2021-02-17T11:53:27.572Z
8+
* Date: 2021-06-12T08:00:17.411Z
99
*/
1010

1111
(function (global, factory) {
@@ -14,6 +14,44 @@
1414
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Cropper = factory());
1515
}(this, (function () { 'use strict';
1616

17+
function ownKeys(object, enumerableOnly) {
18+
var keys = Object.keys(object);
19+
20+
if (Object.getOwnPropertySymbols) {
21+
var symbols = Object.getOwnPropertySymbols(object);
22+
23+
if (enumerableOnly) {
24+
symbols = symbols.filter(function (sym) {
25+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
26+
});
27+
}
28+
29+
keys.push.apply(keys, symbols);
30+
}
31+
32+
return keys;
33+
}
34+
35+
function _objectSpread2(target) {
36+
for (var i = 1; i < arguments.length; i++) {
37+
var source = arguments[i] != null ? arguments[i] : {};
38+
39+
if (i % 2) {
40+
ownKeys(Object(source), true).forEach(function (key) {
41+
_defineProperty(target, key, source[key]);
42+
});
43+
} else if (Object.getOwnPropertyDescriptors) {
44+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
45+
} else {
46+
ownKeys(Object(source)).forEach(function (key) {
47+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
48+
});
49+
}
50+
}
51+
52+
return target;
53+
}
54+
1755
function _typeof(obj) {
1856
"@babel/helpers - typeof";
1957

@@ -67,40 +105,6 @@
67105
return obj;
68106
}
69107

70-
function ownKeys(object, enumerableOnly) {
71-
var keys = Object.keys(object);
72-
73-
if (Object.getOwnPropertySymbols) {
74-
var symbols = Object.getOwnPropertySymbols(object);
75-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
76-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
77-
});
78-
keys.push.apply(keys, symbols);
79-
}
80-
81-
return keys;
82-
}
83-
84-
function _objectSpread2(target) {
85-
for (var i = 1; i < arguments.length; i++) {
86-
var source = arguments[i] != null ? arguments[i] : {};
87-
88-
if (i % 2) {
89-
ownKeys(Object(source), true).forEach(function (key) {
90-
_defineProperty(target, key, source[key]);
91-
});
92-
} else if (Object.getOwnPropertyDescriptors) {
93-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
94-
} else {
95-
ownKeys(Object(source)).forEach(function (key) {
96-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
97-
});
98-
}
99-
}
100-
101-
return target;
102-
}
103-
104108
function _toConsumableArray(arr) {
105109
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
106110
}
@@ -110,7 +114,7 @@
110114
}
111115

112116
function _iterableToArray(iter) {
113-
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
117+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
114118
}
115119

116120
function _unsupportedIterableToArray(o, minLen) {
@@ -1816,9 +1820,11 @@
18161820
var options = this.options,
18171821
container = this.container,
18181822
containerData = this.containerData;
1819-
var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed
1823+
var ratioX = container.offsetWidth / containerData.width;
1824+
var ratioY = container.offsetHeight / containerData.height;
1825+
var ratio = Math.abs(ratioX - 1) > Math.abs(ratioY - 1) ? ratioX : ratioY; // Resize when width changed or height changed
18201826

1821-
if (ratio !== 1 || container.offsetHeight !== containerData.height) {
1827+
if (ratio !== 1) {
18221828
var canvasData;
18231829
var cropBoxData;
18241830

dist/cropper.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)