appscms-tools-theme 2.4.7 → 2.4.8

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: c23136a22bed894e3f493ef62c60f3617b1e3f71e4f302b726952f264dcfa214
4
- data.tar.gz: 90179e9271ed7afe8a96c9504ecd6779996fa11211e2a4946ddc45ee5a959ee9
3
+ metadata.gz: 0ff8e4d6cf7046c1f997584867907b2374e663345dbb5801e82db8bfb269d802
4
+ data.tar.gz: 8b3a0109c8daf839a9ce16a71400b2be6bef6523ffb98975f2063b110998608c
5
5
  SHA512:
6
- metadata.gz: 6ca328542bf36ec06c091670f3e5c112c4fefc5b190ae1828f23c0df26433f32545c0ffc2b527a0d062c83964069d027a4d4de7cd2a919e4c1e73751b4709712
7
- data.tar.gz: e049c429826cc278a5349ad2a4d32e94666946fec5391a7ebdc4c1c7ad3a767ac9467a3ded8094fbc1df969c9d5e6f1dbcb6fabadc17db6c2b1f9a2351acef81
6
+ metadata.gz: 24f4a73a2419072f537426a23d0dcfaeb26956eca4b095bfef8c0f7c964a920073034fe7477d06095f7b303751a39db7d5083449b7acc4cb85fa331319a51f1b
7
+ data.tar.gz: 523524b8df4662daf4c17caef143eef94d266577d77970e0e639c1c04729c347fa826bf558b7a3fbbae42e36434f5b3e0665ec4ac062a5d815281a1e6917ea28
data/assets/js/batch.js CHANGED
@@ -11,7 +11,7 @@ const downloadButton = document.querySelector('#download-button')
11
11
  const submitButton = document.querySelector('#submit-button')
12
12
  const showProcessingFiles = document.querySelector('.files-processing-list')
13
13
  let zipFileType = null
14
- let renderFileTypes = []
14
+ let renderFileTypes = null
15
15
  let root = document.querySelector(':root')
16
16
  root.style.setProperty('--maincolor', fileDropBox.dataset.color)
17
17
 
@@ -102,7 +102,7 @@ let renderFileTypesHtml = ` <option value="png">png</option>
102
102
  `
103
103
 
104
104
  const renderFiles = (files) => {
105
- if (renderFileTypes !== []) {
105
+ if (renderFileTypes !== null) {
106
106
  renderFileTypesHtml = ''
107
107
  renderFileTypes.map((i) => {
108
108
  renderFileTypesHtml += `<option value="${i}">${i}</option>`
@@ -1,36 +1,39 @@
1
+ zipFileType = 'svg'
2
+ renderFileTypes = ['svg']
1
3
  const batchConversion = async (file, indexValue) => {
2
- return new Promise((resolve, reject) => {
3
- if (file) {
4
- const reader = new FileReader()
5
- reader.readAsDataURL(file)
6
- reader.onload = (e) => {
7
- if (e.target.result) {
8
- let image = new Image()
9
- let canvas = document.createElement('canvas')
10
- canvas.setAttribute('id', 'canvas-img')
11
- let ctx = canvas.getContext('2d')
12
- image.onload = () => {
13
- canvas.width = image.width
14
- canvas.height = image.height
15
- // counter.innerHTML = e.target.value + "%"
16
- let filters = document.querySelector('#applyFilter')
17
- if (filters.getAttribute('data-filter') === "opacity") {
18
- ctx.globalAlpha = filters.value
19
- ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
20
- resolve([indexValue, canvas.toDataURL('image/png'), "image"])
21
- } else {
22
- ctx.filter = filters.getAttribute('data-filter') + '(' + filters.value + filters.getAttribute('data-scale') + ') '
23
- ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
24
- resolve([indexValue, canvas.toDataURL('image/png'), "image"])
25
- }
26
-
27
- }
28
- image.src = e.target.result
29
- }
4
+ return new Promise((resolve, reject) => {
5
+ if (file) {
6
+ const reader = new FileReader()
7
+ reader.readAsDataURL(file)
8
+ reader.onload = (e) => {
9
+ if (e.target.result) {
10
+ let image = new Image()
11
+ let canvas = document.createElement('canvas')
12
+ canvas.setAttribute('id', 'canvas-img')
13
+ let ctx = canvas.getContext('2d')
14
+ image.onload = () => {
15
+ canvas.width = image.width
16
+ canvas.height = image.height
17
+ // counter.innerHTML = e.target.value + "%"
18
+ let filters = document.querySelector('#applyFilter')
19
+ if (filters.getAttribute('data-filter') === 'opacity') {
20
+ ctx.globalAlpha = filters.value
21
+ ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
22
+ resolve([indexValue, canvas.toDataURL('image/png'), 'image'])
23
+ } else {
24
+ ctx.filter =
25
+ filters.getAttribute('data-filter') +
26
+ '(' +
27
+ filters.value +
28
+ filters.getAttribute('data-scale') +
29
+ ') '
30
+ ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
31
+ resolve([indexValue, canvas.toDataURL('image/png'), 'image'])
30
32
  }
33
+ }
34
+ image.src = e.target.result
31
35
  }
32
- })
36
+ }
37
+ }
38
+ })
33
39
  }
34
-
35
-
36
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.7
4
+ version: 2.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms