@lemonadejs/cropper 1.5.3 → 1.6.0
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 +11 -8
- package/package.json +1 -1
package/dist/cropper.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
;(function (global, factory) {
|
|
12
12
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
13
13
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
14
|
-
global.
|
|
14
|
+
global.Cropper = factory();
|
|
15
15
|
}(this, (function () {
|
|
16
16
|
|
|
17
17
|
'use strict';
|
|
@@ -34,12 +34,14 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
if (typeof(
|
|
38
|
-
if (typeof(
|
|
39
|
-
var
|
|
40
|
-
} else if (window.
|
|
41
|
-
var
|
|
37
|
+
if (typeof(cropper) == 'undefined') {
|
|
38
|
+
if (typeof(Crop) === 'function') {
|
|
39
|
+
var Crop = require('@jsuites/cropper');
|
|
40
|
+
} else if (window.cropper) {
|
|
41
|
+
var Crop = window.cropper;
|
|
42
42
|
}
|
|
43
|
+
} else {
|
|
44
|
+
var Crop = cropper;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
return (function() {
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
var a = [798, 360];
|
|
77
79
|
var c = [width, height];
|
|
78
80
|
}
|
|
79
|
-
crop =
|
|
81
|
+
crop = Crop(o, {
|
|
80
82
|
area: a,
|
|
81
83
|
crop: c ,
|
|
82
84
|
allowResize: false,
|
|
@@ -301,7 +303,8 @@
|
|
|
301
303
|
var root = lemonade.element(template, self);
|
|
302
304
|
|
|
303
305
|
// Onclick event
|
|
304
|
-
root.addEventListener('
|
|
306
|
+
root.addEventListener('mousedown', function(e) {
|
|
307
|
+
|
|
305
308
|
e = e || window.event;
|
|
306
309
|
if (e.buttons) {
|
|
307
310
|
var mouseButton = e.buttons;
|
package/package.json
CHANGED