@lemonadejs/cropper 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cropper.js +8 -10
- package/package.json +1 -1
package/dist/cropper.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (c) LemonadeJS components
|
|
3
3
|
*
|
|
4
4
|
* Website: https://lemonadejs.net
|
|
5
|
-
* Description: Image cropper v1.
|
|
5
|
+
* Description: Image cropper v1.5.2
|
|
6
6
|
*
|
|
7
7
|
* MIT License
|
|
8
8
|
*
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
return (function() {
|
|
46
|
-
var self =
|
|
46
|
+
var self = this;
|
|
47
47
|
var original = self.original ? 1 : 0;
|
|
48
48
|
var width = self.width || 300;
|
|
49
49
|
var height = self.height || 240;
|
|
@@ -163,13 +163,11 @@
|
|
|
163
163
|
newImage.src = filename;
|
|
164
164
|
// Integration with jSuites.form
|
|
165
165
|
if (self.name) {
|
|
166
|
-
//self.el.content = [data];
|
|
167
|
-
|
|
168
166
|
newImage.classList.remove('jfile');
|
|
169
|
-
} else {
|
|
170
|
-
// Legacy
|
|
171
|
-
newImage.content = data;
|
|
172
167
|
}
|
|
168
|
+
// Value
|
|
169
|
+
self.value = [data];
|
|
170
|
+
// Append new image
|
|
173
171
|
self.image.appendChild(newImage);
|
|
174
172
|
}
|
|
175
173
|
// Create image
|
|
@@ -255,14 +253,14 @@
|
|
|
255
253
|
}
|
|
256
254
|
|
|
257
255
|
self.onload = function() {
|
|
258
|
-
self.image.style.
|
|
259
|
-
self.image.style.
|
|
256
|
+
self.image.style.maxWidth = self.width + 'px';
|
|
257
|
+
self.image.style.maxHeight = self.height + 'px';
|
|
260
258
|
}
|
|
261
259
|
|
|
262
260
|
// Template
|
|
263
261
|
var template = `
|
|
264
262
|
<div name="{{self.name}}" value="{{self.value}}">
|
|
265
|
-
<div @ref='self.image' class="jphoto"></div>
|
|
263
|
+
<div @ref='self.image' class="jphoto jcropper"></div>
|
|
266
264
|
<div @ready='self.createModal(this)'>
|
|
267
265
|
<div @ready='self.createCropper(this)' @ref='self.cropperArea'></div>
|
|
268
266
|
<div @ready='self.createControls(this)' class="controls">
|
package/package.json
CHANGED