appscms-tools-theme 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/js/frame.js +6 -1
- data/assets/js/photo-effects.json +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 453710446bc4e201a7b5e2df1de53122a01e9fa2aaa19050a271ec2169759646
|
4
|
+
data.tar.gz: dba6831293fca990e81216e8c653ff34e288b780dc280c8cf863803666134357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01628b3a082ffaf783bb7038fa49f973510388143d427ff730656a637cd3ae9c264c884eb260ab61ac17cdd91c40281311e1228327b20b292b7e38069feed044'
|
7
|
+
data.tar.gz: da1d00b2138166f94355700089c046889a6d25da6ad67f8b7b2d2425d808f1618fa25952747831692ddd49d47ec70793ef2c596663e7e0f496a6b35960496aea
|
data/assets/js/frame.js
CHANGED
@@ -123,11 +123,13 @@ const drawImage = () => {
|
|
123
123
|
if (item.type === 'text') {
|
124
124
|
let myFont = new FontFace(item.font, `url(${item.fontPath})`)
|
125
125
|
myFont.load().then(function (font) {
|
126
|
+
ctx.save()
|
126
127
|
document.fonts.add(font)
|
127
128
|
ctx.font = `${item.fontSize}px ${item.font}`
|
128
129
|
if (item.shadowColor) {
|
129
130
|
ctx.shadowColor = `${item.shadowColor}`
|
130
131
|
}
|
132
|
+
|
131
133
|
if (item.shadowOffsetX) {
|
132
134
|
ctx.shadowOffsetX = 3
|
133
135
|
}
|
@@ -137,7 +139,9 @@ const drawImage = () => {
|
|
137
139
|
if (item.shadowBlur) {
|
138
140
|
ctx.shadowBlur = 2
|
139
141
|
}
|
140
|
-
|
142
|
+
if (item.rotate) {
|
143
|
+
ctx.rotate((item.rotate * Math.PI) / 180)
|
144
|
+
}
|
141
145
|
ctx.textAlign = 'center'
|
142
146
|
ctx.fillStyle = `${item.color}`
|
143
147
|
ctx.fillText(
|
@@ -145,6 +149,7 @@ const drawImage = () => {
|
|
145
149
|
item.x,
|
146
150
|
item.y
|
147
151
|
)
|
152
|
+
ctx.restore()
|
148
153
|
})
|
149
154
|
}
|
150
155
|
if (item.type === 'rectangle') {
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"x": "100",
|
21
21
|
"y": "100",
|
22
22
|
"color": "red",
|
23
|
-
"rotate":
|
23
|
+
"rotate": 10,
|
24
24
|
"fontFamily": "Calligraphy",
|
25
25
|
"fontPath": "/assets/fonts/Calligraphy.ttf",
|
26
26
|
"fontWeight": "bold",
|
@@ -33,8 +33,9 @@
|
|
33
33
|
"perspective": "",
|
34
34
|
"height": 300,
|
35
35
|
"width": 300,
|
36
|
-
"
|
37
|
-
"
|
36
|
+
"rotate": 1,
|
37
|
+
"x": 0,
|
38
|
+
"y": 0,
|
38
39
|
"id": "file-3"
|
39
40
|
},
|
40
41
|
{
|