dynamic_scaffold 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d38fc22e5839b2a4f2fda31b49b33750e787500a6d031d19e713bef0cf77019
|
4
|
+
data.tar.gz: 5a40a274745f8f9f39e8928f5aa0063c188142a9b714593137e5b0a75d3ad09c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a1bb89adddf8b3ad91d241cac6090f3e6bc9b8a58f6a2160f9f546529a62763451acf61230ebf0abfd166b4527dc6427ae3c659578b8035e2ff220704d1bba3
|
7
|
+
data.tar.gz: 152ed6d4b6bacce23dd7eb49619211796bb6cc12b885677a59789714477028717b63deb74a9582911e5c695c36714c1f57f2cd7b4a23bcaba38d44b81386ad2e
|
@@ -29,16 +29,18 @@ document.addEventListener('dynamic_scaffold:load', function (){
|
|
29
29
|
}
|
30
30
|
|
31
31
|
// change event
|
32
|
+
var cropper = undefined
|
32
33
|
input.addEventListener('change', function(e){
|
33
34
|
const reader = new FileReader();
|
34
35
|
reader.onload = function (e) {
|
36
|
+
if(cropper) cropper.destroy()
|
35
37
|
img.src = e.target.result
|
36
38
|
if(cropper_input){
|
37
39
|
const options = JSON.parse(cropper_input.getAttribute('data-options'))
|
38
40
|
options.crop = function(event){
|
39
41
|
cropper_input.value = JSON.stringify(event.detail)
|
40
42
|
}
|
41
|
-
|
43
|
+
cropper = new Cropper(img, options)
|
42
44
|
}
|
43
45
|
|
44
46
|
preview.style.display = 'inline-block'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masamoto Miyata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: classnames-rails-view
|