Skip to content

Commit bf74458

Browse files
committed
Upgraded cropperjs version
1 parent 07a2315 commit bf74458

File tree

4 files changed

+50
-43
lines changed

4 files changed

+50
-43
lines changed

VERSIONS.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
| Gem | Cropper.js | jQuery Cropper |
44
|--------|------------|----------------|
5+
| 1.1.5 | 1.5.12 | 1.0.1 |
56
| 1.1.4 | 1.5.11 | 1.0.1 |
67
| 1.1.3 | 1.5.11 | 1.0.1 |
78
| 1.1.2 | 1.5.10 | 1.0.1 |

lib/cropper_rails/version.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Cropper
22
module Rails
3-
VERSION = '1.1.4'.freeze
4-
CROPPER_VERSION = '1.5.11'.freeze
3+
VERSION = '1.1.5'.freeze
4+
CROPPER_VERSION = '1.5.12'.freeze
55
JQUERY_CROPPER_VERSION = '1.0.1'.freeze
66
end
77
end

vendor/assets/javascripts/cropper.js

+45-39
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

vendor/assets/stylesheets/cropper.css

+2-2
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 {

0 commit comments

Comments
 (0)