@live-change/image-frontend 0.2.20 → 0.2.21
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/Image.vue +9 -3
- package/package.json +2 -2
package/front/src/Image.vue
CHANGED
|
@@ -96,14 +96,20 @@
|
|
|
96
96
|
function getSuffix() {
|
|
97
97
|
if(props.noResize) return ''
|
|
98
98
|
const domSize = stableDomSize.value
|
|
99
|
+
let width = (domSize.width * dpr)|0
|
|
100
|
+
let height = (domSize.height * dpr)|0
|
|
101
|
+
if(imageData.value) {
|
|
102
|
+
width = Math.min(width, imageData.value.width)
|
|
103
|
+
height = Math.min(height, imageData.value.height)
|
|
104
|
+
}
|
|
99
105
|
if(props.domResize && domSize) {
|
|
100
106
|
console.log("DOM SIZE", domSize)
|
|
101
107
|
if(props.domResize == 'width') {
|
|
102
|
-
return `/width-${
|
|
108
|
+
return `/width-${width}`
|
|
103
109
|
} else if(props.domResize == 'height') {
|
|
104
|
-
return `/height-${
|
|
110
|
+
return `/height-${height}`
|
|
105
111
|
} else {
|
|
106
|
-
return `/rect-${
|
|
112
|
+
return `/rect-${width}-${height}`
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
if(props.width && props.height) return `/rect-${(props.width*dpr)|0}-${(props.height*dpr)|0}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/image-frontend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "lcli memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"author": "",
|
|
63
63
|
"license": "BSD-3-Clause",
|
|
64
64
|
"description": "",
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c26408cfdc9dfb20a45127dbee1751258edaf4da"
|
|
66
66
|
}
|