@lemonadejs/cropper 1.5.3 → 1.6.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.
Files changed (2) hide show
  1. package/dist/cropper.js +18 -14
  2. 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.cropper = factory();
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(jSuites.crop) == 'undefined') {
37
+ if (typeof(cropper) == 'undefined') {
38
38
  if (typeof(require) === 'function') {
39
- var Cropper = require('@jsuites/cropper');
40
- } else if (window.jSuites) {
41
- var Cropper = jSuites.crop;
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() {
@@ -63,7 +65,8 @@
63
65
  width: '800px',
64
66
  height: '680px',
65
67
  title: 'Photo Upload',
66
- padding: '0'
68
+ padding: '0',
69
+ icon: 'photo'
67
70
  });
68
71
  }
69
72
 
@@ -76,7 +79,7 @@
76
79
  var a = [798, 360];
77
80
  var c = [width, height];
78
81
  }
79
- crop = Cropper(o, {
82
+ crop = Crop(o, {
80
83
  area: a,
81
84
  crop: c ,
82
85
  allowResize: false,
@@ -102,16 +105,16 @@
102
105
  self.createControls = function(o) {
103
106
  var tabs = jSuites.tabs(o.children[0], {
104
107
  data: [{
105
- title: 'Crop',
106
- icon: 'crop',
107
- width: '100px',
108
- },
108
+ title: 'Crop',
109
+ icon: 'crop',
110
+ width: '100px',
111
+ },
109
112
  {
110
113
  title:'Adjusts',
111
114
  icon: 'image',
112
115
  width: '100px',
113
116
  }],
114
- padding:'20px',
117
+ padding:'10px',
115
118
  animation: true,
116
119
  position: 'bottom',
117
120
  });
@@ -284,7 +287,7 @@
284
287
  </div>
285
288
  </div>
286
289
  </div>
287
- <div class='row p20 form-group' style='border-top: 1px solid #aaa'>
290
+ <div class='row p20' style='border-top: 1px solid #aaa'>
288
291
  <div class='column p6 f1'>
289
292
  <input type='button' value='Save Photo' class='jbutton dark controls w100' style='min-width: 140px;' onclick='self.updatePhoto()' disabled='disabled'>
290
293
  </div><div class='column p6'>
@@ -301,7 +304,8 @@
301
304
  var root = lemonade.element(template, self);
302
305
 
303
306
  // Onclick event
304
- root.addEventListener('click', function(e) {
307
+ root.addEventListener('mousedown', function(e) {
308
+
305
309
  e = e || window.event;
306
310
  if (e.buttons) {
307
311
  var mouseButton = e.buttons;
package/package.json CHANGED
@@ -19,5 +19,5 @@
19
19
  "@jsuites/cropper": "^1.6.0"
20
20
  },
21
21
  "main": "dist/cropper.js",
22
- "version": "1.5.3"
22
+ "version": "1.6.2"
23
23
  }