cropper_rails 1.0.1 → 1.1.3
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.
- checksums.yaml +4 -4
- data/LICENSE +6 -6
- data/VERSIONS.md +5 -0
- data/cropper_rails.gemspec +1 -1
- data/lib/cropper_rails/version.rb +3 -3
- data/vendor/assets/javascripts/cropper.js +318 -209
- data/vendor/assets/javascripts/jquery-cropper.js +11 -13
- data/vendor/assets/stylesheets/cropper.css +14 -14
- metadata +8 -10
- data/.rubocop.yml +0 -13
@@ -1,33 +1,32 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery Cropper v1.0.
|
3
|
-
* https://github.
|
2
|
+
* jQuery Cropper v1.0.1
|
3
|
+
* https://fengyuanchen.github.io/jquery-cropper
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2018-present Chen Fengyuan
|
6
6
|
* Released under the MIT license
|
7
7
|
*
|
8
|
-
* Date:
|
8
|
+
* Date: 2019-10-19T08:48:33.062Z
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function (global, factory) {
|
12
12
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('cropperjs')) :
|
13
13
|
typeof define === 'function' && define.amd ? define(['jquery', 'cropperjs'], factory) :
|
14
|
-
(factory(global.jQuery,global.Cropper));
|
15
|
-
}(this,
|
14
|
+
(global = global || self, factory(global.jQuery, global.Cropper));
|
15
|
+
}(this, function ($, Cropper) { 'use strict';
|
16
16
|
|
17
17
|
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
18
18
|
Cropper = Cropper && Cropper.hasOwnProperty('default') ? Cropper['default'] : Cropper;
|
19
19
|
|
20
|
-
if ($.fn) {
|
20
|
+
if ($ && $.fn && Cropper) {
|
21
21
|
var AnotherCropper = $.fn.cropper;
|
22
22
|
var NAMESPACE = 'cropper';
|
23
23
|
|
24
24
|
$.fn.cropper = function jQueryCropper(option) {
|
25
|
-
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
25
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
26
26
|
args[_key - 1] = arguments[_key];
|
27
27
|
}
|
28
28
|
|
29
|
-
var result
|
30
|
-
|
29
|
+
var result;
|
31
30
|
this.each(function (i, element) {
|
32
31
|
var $element = $(element);
|
33
32
|
var isDestroy = option === 'destroy';
|
@@ -39,7 +38,6 @@
|
|
39
38
|
}
|
40
39
|
|
41
40
|
var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);
|
42
|
-
|
43
41
|
cropper = new Cropper(element, options);
|
44
42
|
$element.data(NAMESPACE, cropper);
|
45
43
|
}
|
@@ -60,16 +58,16 @@
|
|
60
58
|
}
|
61
59
|
}
|
62
60
|
});
|
63
|
-
|
64
61
|
return result !== undefined ? result : this;
|
65
62
|
};
|
66
63
|
|
67
64
|
$.fn.cropper.Constructor = Cropper;
|
68
65
|
$.fn.cropper.setDefaults = Cropper.setDefaults;
|
66
|
+
|
69
67
|
$.fn.cropper.noConflict = function noConflict() {
|
70
68
|
$.fn.cropper = AnotherCropper;
|
71
69
|
return this;
|
72
70
|
};
|
73
71
|
}
|
74
72
|
|
75
|
-
}))
|
73
|
+
}));
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/*!
|
2
|
-
* Cropper.js v1.
|
2
|
+
* Cropper.js v1.5.11
|
3
3
|
* https://fengyuanchen.github.io/cropperjs
|
4
4
|
*
|
5
5
|
* Copyright 2015-present Chen Fengyuan
|
6
6
|
* Released under the MIT license
|
7
7
|
*
|
8
|
-
* Date:
|
8
|
+
* Date: 2021-02-17T11:53:21.992Z
|
9
9
|
*/
|
10
10
|
|
11
11
|
.cropper-container {
|
@@ -56,14 +56,14 @@
|
|
56
56
|
|
57
57
|
.cropper-modal {
|
58
58
|
background-color: #000;
|
59
|
-
opacity: .5;
|
59
|
+
opacity: 0.5;
|
60
60
|
}
|
61
61
|
|
62
62
|
.cropper-view-box {
|
63
63
|
display: block;
|
64
64
|
height: 100%;
|
65
|
-
outline-color: rgba(51, 153, 255, 0.75);
|
66
65
|
outline: 1px solid #39f;
|
66
|
+
outline-color: rgba(51, 153, 255, 0.75);
|
67
67
|
overflow: hidden;
|
68
68
|
width: 100%;
|
69
69
|
}
|
@@ -71,7 +71,7 @@
|
|
71
71
|
.cropper-dashed {
|
72
72
|
border: 0 dashed #eee;
|
73
73
|
display: block;
|
74
|
-
opacity: .5;
|
74
|
+
opacity: 0.5;
|
75
75
|
position: absolute;
|
76
76
|
}
|
77
77
|
|
@@ -97,28 +97,28 @@
|
|
97
97
|
display: block;
|
98
98
|
height: 0;
|
99
99
|
left: 50%;
|
100
|
-
opacity: .75;
|
100
|
+
opacity: 0.75;
|
101
101
|
position: absolute;
|
102
102
|
top: 50%;
|
103
103
|
width: 0;
|
104
104
|
}
|
105
105
|
|
106
|
-
.cropper-center
|
107
|
-
.cropper-center
|
106
|
+
.cropper-center::before,
|
107
|
+
.cropper-center::after {
|
108
108
|
background-color: #eee;
|
109
109
|
content: ' ';
|
110
110
|
display: block;
|
111
111
|
position: absolute;
|
112
112
|
}
|
113
113
|
|
114
|
-
.cropper-center
|
114
|
+
.cropper-center::before {
|
115
115
|
height: 1px;
|
116
116
|
left: -3px;
|
117
117
|
top: 0;
|
118
118
|
width: 7px;
|
119
119
|
}
|
120
120
|
|
121
|
-
.cropper-center
|
121
|
+
.cropper-center::after {
|
122
122
|
height: 7px;
|
123
123
|
left: 0;
|
124
124
|
top: -3px;
|
@@ -130,7 +130,7 @@
|
|
130
130
|
.cropper-point {
|
131
131
|
display: block;
|
132
132
|
height: 100%;
|
133
|
-
opacity: .1;
|
133
|
+
opacity: 0.1;
|
134
134
|
position: absolute;
|
135
135
|
width: 100%;
|
136
136
|
}
|
@@ -176,7 +176,7 @@
|
|
176
176
|
.cropper-point {
|
177
177
|
background-color: #39f;
|
178
178
|
height: 5px;
|
179
|
-
opacity: .75;
|
179
|
+
opacity: 0.75;
|
180
180
|
width: 5px;
|
181
181
|
}
|
182
182
|
|
@@ -252,12 +252,12 @@
|
|
252
252
|
@media (min-width: 1200px) {
|
253
253
|
.cropper-point.point-se {
|
254
254
|
height: 5px;
|
255
|
-
opacity: .75;
|
255
|
+
opacity: 0.75;
|
256
256
|
width: 5px;
|
257
257
|
}
|
258
258
|
}
|
259
259
|
|
260
|
-
.cropper-point.point-se
|
260
|
+
.cropper-point.point-se::before {
|
261
261
|
background-color: #39f;
|
262
262
|
bottom: -50%;
|
263
263
|
content: ' ';
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cropper_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- D1ceWard
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
description: Cropper is a simple image cropping library. This gem integrates Cropper
|
42
42
|
with Rails asset pipeline for ease of use.
|
43
43
|
email:
|
@@ -49,7 +49,6 @@ files:
|
|
49
49
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
50
50
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
51
51
|
- ".gitignore"
|
52
|
-
- ".rubocop.yml"
|
53
52
|
- CODE_OF_CONDUCT.md
|
54
53
|
- CONTRIBUTING.md
|
55
54
|
- Gemfile
|
@@ -67,7 +66,7 @@ homepage: https://github.com/D1ceWard/cropper_rails
|
|
67
66
|
licenses:
|
68
67
|
- MIT
|
69
68
|
metadata: {}
|
70
|
-
post_install_message:
|
69
|
+
post_install_message:
|
71
70
|
rdoc_options: []
|
72
71
|
require_paths:
|
73
72
|
- lib
|
@@ -82,9 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
81
|
- !ruby/object:Gem::Version
|
83
82
|
version: '0'
|
84
83
|
requirements: []
|
85
|
-
|
86
|
-
|
87
|
-
signing_key:
|
84
|
+
rubygems_version: 3.2.6
|
85
|
+
signing_key:
|
88
86
|
specification_version: 4
|
89
87
|
summary: Integrate Cropper library with Rails asset pipeline
|
90
88
|
test_files: []
|