@live-change/image-frontend 0.9.27 → 0.9.28
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.
- package/front/src/ImageCrop.vue +5 -5
- package/package.json +12 -12
package/front/src/ImageCrop.vue
CHANGED
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
if(!content) return
|
|
82
82
|
if(!editor) return
|
|
83
83
|
const pixelRatio = window.devicePixelRatio || 1
|
|
84
|
-
if((canvas.width
|
|
85
|
-
|| (canvas.height
|
|
84
|
+
if((canvas.width !== Math.floor(canvas.clientWidth * pixelRatio))
|
|
85
|
+
|| (canvas.height !== Math.floor(canvas.clientHeight * pixelRatio))) {
|
|
86
86
|
canvas.width = Math.floor(canvas.clientWidth * pixelRatio)
|
|
87
87
|
canvas.height = Math.floor(canvas.clientHeight * pixelRatio)
|
|
88
88
|
}
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
context.fillRect(0, 0, canvas.width, canvas.height)
|
|
96
96
|
context.strokeStyle = "white"
|
|
97
97
|
context.lineWidth = 1.5 * pixelRatio;
|
|
98
|
-
if(props.type
|
|
98
|
+
if(props.type === 'circle') {
|
|
99
99
|
context.save()
|
|
100
100
|
context.globalCompositeOperation = 'destination-out'
|
|
101
101
|
context.fillStyle = '#000'
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
return Math.sqrt(x*x+y*y)
|
|
234
234
|
}).reduce((a,b) => a + b / newTouches.length, 0)
|
|
235
235
|
: 1
|
|
236
|
-
if(newTouches.length
|
|
236
|
+
if(newTouches.length === (dragStart.value && dragStart.value.touchCount || 0)) {
|
|
237
237
|
if(!newTouches.length) return
|
|
238
238
|
//console.log("newSize", newSize, "size", this.dragStart.size, "scale", this.dragStart.size * newSize)
|
|
239
239
|
updatePosition(
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
function handleEditorTouchMove(ev) {
|
|
300
300
|
ev.preventDefault()
|
|
301
301
|
ev.stopPropagation()
|
|
302
|
-
if(
|
|
302
|
+
if(dragArea.value && cropArea.value) updateTouches(
|
|
303
303
|
Array.prototype.slice.call(ev.targetTouches).map(t => preProcessTouch(t, t.identifier))
|
|
304
304
|
)
|
|
305
305
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/image-frontend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.28",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
25
|
-
"@live-change/cli": "^0.9.
|
|
26
|
-
"@live-change/dao": "^0.9.
|
|
27
|
-
"@live-change/dao-vue3": "^0.9.
|
|
28
|
-
"@live-change/dao-websocket": "^0.9.
|
|
29
|
-
"@live-change/framework": "^0.9.
|
|
30
|
-
"@live-change/image-service": "^0.9.
|
|
31
|
-
"@live-change/session-service": "^0.9.
|
|
32
|
-
"@live-change/vue3-components": "^0.9.
|
|
33
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
25
|
+
"@live-change/cli": "^0.9.28",
|
|
26
|
+
"@live-change/dao": "^0.9.28",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.28",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.28",
|
|
29
|
+
"@live-change/framework": "^0.9.28",
|
|
30
|
+
"@live-change/image-service": "^0.9.28",
|
|
31
|
+
"@live-change/session-service": "^0.9.28",
|
|
32
|
+
"@live-change/vue3-components": "^0.9.28",
|
|
33
|
+
"@live-change/vue3-ssr": "^0.9.28",
|
|
34
34
|
"@vueuse/core": "^12.3.0",
|
|
35
35
|
"codeceptjs-assert": "^0.0.5",
|
|
36
36
|
"compression": "^1.7.5",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"vue3-scroll-border": "0.1.6"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
53
|
+
"@live-change/codeceptjs-helper": "^0.9.28",
|
|
54
54
|
"codeceptjs": "^3.6.10",
|
|
55
55
|
"generate-password": "1.7.1",
|
|
56
56
|
"playwright": "1.49.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
62
62
|
"license": "BSD-3-Clause",
|
|
63
63
|
"description": "",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "f308e368e678fa38ddef6a6d4999ad730b18e8ce"
|
|
65
65
|
}
|