Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4152050
commit 62eebea
Showing
9 changed files
with
363 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
* | ||
* Copyright (c) 2018 Chen Fengyuan | ||
* Released under the MIT license | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
|
||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) : | ||
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) : | ||
(factory(global.jQuery,global.Cropper)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) : | ||
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) : | ||
(factory(global.jQuery,global.Cropper)); | ||
}(this, (function ($,Cropper) { 'use strict'; | ||
|
||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper; | ||
|
||
if ($.fn) { | ||
var AnotherCropper = $.fn.cropper; | ||
var NAMESPACE = 'cropper'; | ||
if ($.fn) { | ||
var AnotherCropper = $.fn.cropper; | ||
var NAMESPACE = 'cropper'; | ||
|
||
$.fn.cropper = function jQueryCropper(option) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
$.fn.cropper = function jQueryCropper(option) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
|
||
var result = void 0; | ||
var result = void 0; | ||
|
||
this.each(function (i, element) { | ||
var $element = $(element); | ||
var isDestroy = option === 'destroy'; | ||
var cropper = $element.data(NAMESPACE); | ||
this.each(function (i, element) { | ||
var $element = $(element); | ||
var isDestroy = option === 'destroy'; | ||
var cropper = $element.data(NAMESPACE); | ||
|
||
if (!cropper) { | ||
if (isDestroy) { | ||
return; | ||
} | ||
if (!cropper) { | ||
if (isDestroy) { | ||
return; | ||
} | ||
|
||
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option); | ||
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option); | ||
|
||
cropper = new Cropper(element, options); | ||
$element.data(NAMESPACE, cropper); | ||
} | ||
cropper = new Cropper(element, options); | ||
$element.data(NAMESPACE, cropper); | ||
} | ||
|
||
if (typeof option === 'string') { | ||
var fn = cropper[option]; | ||
if (typeof option === 'string') { | ||
var fn = cropper[option]; | ||
|
||
if ($.isFunction(fn)) { | ||
result = fn.apply(cropper, args); | ||
if ($.isFunction(fn)) { | ||
result = fn.apply(cropper, args); | ||
|
||
if (result === cropper) { | ||
result = undefined; | ||
} | ||
if (result === cropper) { | ||
result = undefined; | ||
} | ||
|
||
if (isDestroy) { | ||
$element.removeData(NAMESPACE); | ||
if (isDestroy) { | ||
$element.removeData(NAMESPACE); | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
|
||
return typeof result === 'undefined' ? this : result; | ||
}; | ||
|
||
$.fn.cropper.Constructor = Cropper; | ||
$.fn.cropper.setDefaults = Cropper.setDefaults; | ||
$.fn.cropper.noConflict = function noConflict() { | ||
$.fn.cropper = AnotherCropper; | ||
return this; | ||
}; | ||
} | ||
}); | ||
|
||
return result !== undefined ? result : this; | ||
}; | ||
|
||
$.fn.cropper.Constructor = Cropper; | ||
$.fn.cropper.setDefaults = Cropper.setDefaults; | ||
$.fn.cropper.noConflict = function noConflict() { | ||
$.fn.cropper = AnotherCropper; | ||
return this; | ||
}; | ||
} | ||
|
||
}))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
* | ||
* Copyright (c) 2018 Chen Fengyuan | ||
* Released under the MIT license | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery"),require("cropperjs")):"function"==typeof define&&define.amd?define(["jquery","cropperjs"],r):r(e.jQuery,e.Cropper)}(this,function(e,r){"use strict";if(e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r,e.fn){var t=e.fn.cropper,n="cropper";e.fn.cropper=function(t){for(var o=arguments.length,f=Array(o>1?o-1:0),i=1;i<o;i++)f[i-1]=arguments[i];var p=void 0;return this.each(function(o,i){var a=e(i),u="destroy"===t,c=a.data(n);if(!c){if(u)return;var s=e.extend({},a.data(),e.isPlainObject(t)&&t);c=new r(i,s),a.data(n,c)}if("string"==typeof t){var d=c[t];e.isFunction(d)&&((p=d.apply(c,f))===c&&(p=void 0),u&&a.removeData(n))}}),void 0===p?this:p},e.fn.cropper.Constructor=r,e.fn.cropper.setDefaults=r.setDefaults,e.fn.cropper.noConflict=function(){return e.fn.cropper=t,this}}}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery"),require("cropperjs")):"function"==typeof define&&define.amd?define(["jquery","cropperjs"],r):r(e.jQuery,e.Cropper)}(this,function(c,s){"use strict";if(c=c&&c.hasOwnProperty("default")?c.default:c,s=s&&s.hasOwnProperty("default")?s.default:s,c.fn){var e=c.fn.cropper,d="cropper";c.fn.cropper=function(p){for(var e=arguments.length,a=Array(1<e?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];var u=void 0;return this.each(function(e,r){var t=c(r),n="destroy"===p,o=t.data(d);if(!o){if(n)return;var f=c.extend({},t.data(),c.isPlainObject(p)&&p);o=new s(r,f),t.data(d,o)}if("string"==typeof p){var i=o[p];c.isFunction(i)&&((u=i.apply(o,a))===o&&(u=void 0),n&&t.removeData(d))}}),void 0!==u?u:this},c.fn.cropper.Constructor=s,c.fn.cropper.setDefaults=s.setDefaults,c.fn.cropper.noConflict=function(){return c.fn.cropper=e,this}}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
/*! | ||
* jQuery Cropper v1.0.0-beta | ||
* jQuery Cropper v1.0.0 | ||
* https://github.com/fengyuanchen/jquery-cropper | ||
* | ||
* Copyright (c) 2018 Chen Fengyuan | ||
* Released under the MIT license | ||
* | ||
* Date: 2018-03-03T04:12:17.906Z | ||
* Date: 2018-04-01T06:20:13.168Z | ||
*/ | ||
|
||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) : | ||
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) : | ||
(factory(global.jQuery,global.Cropper)); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) : | ||
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) : | ||
(factory(global.jQuery,global.Cropper)); | ||
}(this, (function ($,Cropper) { 'use strict'; | ||
|
||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper; | ||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $; | ||
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper; | ||
|
||
if ($.fn) { | ||
var AnotherCropper = $.fn.cropper; | ||
var NAMESPACE = 'cropper'; | ||
if ($.fn) { | ||
var AnotherCropper = $.fn.cropper; | ||
var NAMESPACE = 'cropper'; | ||
|
||
$.fn.cropper = function jQueryCropper(option) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
$.fn.cropper = function jQueryCropper(option) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
|
||
var result = void 0; | ||
var result = void 0; | ||
|
||
this.each(function (i, element) { | ||
var $element = $(element); | ||
var isDestroy = option === 'destroy'; | ||
var cropper = $element.data(NAMESPACE); | ||
this.each(function (i, element) { | ||
var $element = $(element); | ||
var isDestroy = option === 'destroy'; | ||
var cropper = $element.data(NAMESPACE); | ||
|
||
if (!cropper) { | ||
if (isDestroy) { | ||
return; | ||
} | ||
if (!cropper) { | ||
if (isDestroy) { | ||
return; | ||
} | ||
|
||
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option); | ||
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option); | ||
|
||
cropper = new Cropper(element, options); | ||
$element.data(NAMESPACE, cropper); | ||
} | ||
cropper = new Cropper(element, options); | ||
$element.data(NAMESPACE, cropper); | ||
} | ||
|
||
if (typeof option === 'string') { | ||
var fn = cropper[option]; | ||
if (typeof option === 'string') { | ||
var fn = cropper[option]; | ||
|
||
if ($.isFunction(fn)) { | ||
result = fn.apply(cropper, args); | ||
if ($.isFunction(fn)) { | ||
result = fn.apply(cropper, args); | ||
|
||
if (result === cropper) { | ||
result = undefined; | ||
} | ||
if (result === cropper) { | ||
result = undefined; | ||
} | ||
|
||
if (isDestroy) { | ||
$element.removeData(NAMESPACE); | ||
if (isDestroy) { | ||
$element.removeData(NAMESPACE); | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
|
||
return typeof result === 'undefined' ? this : result; | ||
}; | ||
|
||
$.fn.cropper.Constructor = Cropper; | ||
$.fn.cropper.setDefaults = Cropper.setDefaults; | ||
$.fn.cropper.noConflict = function noConflict() { | ||
$.fn.cropper = AnotherCropper; | ||
return this; | ||
}; | ||
} | ||
}); | ||
|
||
return result !== undefined ? result : this; | ||
}; | ||
|
||
$.fn.cropper.Constructor = Cropper; | ||
$.fn.cropper.setDefaults = Cropper.setDefaults; | ||
$.fn.cropper.noConflict = function noConflict() { | ||
$.fn.cropper = AnotherCropper; | ||
return this; | ||
}; | ||
} | ||
|
||
}))); |
Oops, something went wrong.