feat: 基础交互完成
parent
35cfec51ec
commit
0a2f2ac810
Binary file not shown.
After Width: | Height: | Size: 1022 B |
Binary file not shown.
After Width: | Height: | Size: 965 B |
Binary file not shown.
After Width: | Height: | Size: 781 B |
@ -0,0 +1,93 @@
|
||||
export const usePointObject = () => {
|
||||
function getPointObject(record) {
|
||||
const { imgUrl } = record;
|
||||
// TODO: 获取点位对象
|
||||
return JSON.stringify({
|
||||
version: "5.3.0",
|
||||
objects: [
|
||||
{
|
||||
type: "rect",
|
||||
version: "5.3.0",
|
||||
originX: "left",
|
||||
originY: "top",
|
||||
left: 0,
|
||||
top: 0,
|
||||
width: 947,
|
||||
height: 610,
|
||||
fill: "rgba(255,35,255,1)",
|
||||
stroke: null,
|
||||
strokeWidth: 0,
|
||||
strokeDashArray: null,
|
||||
strokeLineCap: "butt",
|
||||
strokeDashOffset: 0,
|
||||
strokeLineJoin: "miter",
|
||||
strokeUniform: false,
|
||||
strokeMiterLimit: 4,
|
||||
scaleX: 1,
|
||||
scaleY: 1,
|
||||
angle: 0,
|
||||
flipX: false,
|
||||
flipY: false,
|
||||
opacity: 1,
|
||||
shadow: null,
|
||||
visible: true,
|
||||
backgroundColor: "",
|
||||
fillRule: "nonzero",
|
||||
paintFirst: "fill",
|
||||
globalCompositeOperation: "source-over",
|
||||
skewX: 0,
|
||||
skewY: 0,
|
||||
rx: 0,
|
||||
ry: 0,
|
||||
id: "workspace",
|
||||
selectable: false,
|
||||
hasControls: false
|
||||
},
|
||||
{
|
||||
type: "image",
|
||||
version: "5.3.0",
|
||||
originX: "left",
|
||||
originY: "top",
|
||||
width: 947,
|
||||
height: 610,
|
||||
fill: "rgb(0,0,0)",
|
||||
stroke: null,
|
||||
strokeWidth: 0,
|
||||
strokeDashArray: null,
|
||||
strokeLineCap: "butt",
|
||||
strokeDashOffset: 0,
|
||||
strokeLineJoin: "miter",
|
||||
strokeUniform: false,
|
||||
strokeMiterLimit: 4,
|
||||
scaleX: 1,
|
||||
scaleY: 1,
|
||||
angle: 0,
|
||||
flipX: false,
|
||||
flipY: false,
|
||||
opacity: 1,
|
||||
shadow: null,
|
||||
visible: true,
|
||||
backgroundColor: "",
|
||||
fillRule: "nonzero",
|
||||
paintFirst: "fill",
|
||||
globalCompositeOperation: "source-over",
|
||||
skewX: 0,
|
||||
skewY: 0,
|
||||
cropX: 0,
|
||||
cropY: 0,
|
||||
id: "a3ab29c6-7008-49fe-abf3-edc9a47cd460",
|
||||
selectable: false,
|
||||
hasControls: false,
|
||||
evented: false,
|
||||
crossOrigin: null,
|
||||
src: imgUrl,
|
||||
filters: []
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
getPointObject
|
||||
};
|
||||
};
|
@ -1,85 +0,0 @@
|
||||
{
|
||||
"version": "5.3.0",
|
||||
"objects": [
|
||||
{
|
||||
"type": "rect",
|
||||
"version": "5.3.0",
|
||||
"originX": "left",
|
||||
"originY": "top",
|
||||
"left": 0,
|
||||
"top": 0,
|
||||
"width": 1200,
|
||||
"height": 900,
|
||||
"fill": "rgba(255,255,255,1)",
|
||||
"stroke": null,
|
||||
"strokeWidth": 0,
|
||||
"strokeDashArray": null,
|
||||
"strokeLineCap": "butt",
|
||||
"strokeDashOffset": 0,
|
||||
"strokeLineJoin": "miter",
|
||||
"strokeUniform": false,
|
||||
"strokeMiterLimit": 4,
|
||||
"scaleX": 1,
|
||||
"scaleY": 1,
|
||||
"angle": 0,
|
||||
"flipX": false,
|
||||
"flipY": false,
|
||||
"opacity": 1,
|
||||
"shadow": null,
|
||||
"visible": true,
|
||||
"backgroundColor": "",
|
||||
"fillRule": "nonzero",
|
||||
"paintFirst": "fill",
|
||||
"globalCompositeOperation": "source-over",
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"rx": 0,
|
||||
"ry": 0,
|
||||
"id": "workspace",
|
||||
"selectable": false,
|
||||
"hasControls": false
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"version": "5.3.0",
|
||||
"originX": "left",
|
||||
"originY": "top",
|
||||
"left": 23.2346,
|
||||
"top": 23.0507,
|
||||
"width": 1600,
|
||||
"height": 1200,
|
||||
"fill": "rgb(0,0,0)",
|
||||
"stroke": null,
|
||||
"strokeWidth": 0,
|
||||
"strokeDashArray": null,
|
||||
"strokeLineCap": "butt",
|
||||
"strokeDashOffset": 0,
|
||||
"strokeLineJoin": "miter",
|
||||
"strokeUniform": false,
|
||||
"strokeMiterLimit": 4,
|
||||
"scaleX": 0.721,
|
||||
"scaleY": 0.721,
|
||||
"angle": 0,
|
||||
"flipX": false,
|
||||
"flipY": false,
|
||||
"opacity": 1,
|
||||
"shadow": null,
|
||||
"visible": true,
|
||||
"backgroundColor": "",
|
||||
"fillRule": "nonzero",
|
||||
"paintFirst": "fill",
|
||||
"globalCompositeOperation": "source-over",
|
||||
"skewX": 0,
|
||||
"skewY": 0,
|
||||
"cropX": 0,
|
||||
"cropY": 0,
|
||||
"id": "a3ab29c6-7008-49fe-abf3-edc9a47cd460",
|
||||
"selectable": false,
|
||||
"hasControls": false,
|
||||
"evented": false,
|
||||
"crossOrigin": null,
|
||||
"src": "https://img.cgmodel.com/image/2020/1010/big/1537169-1390622992.jpg",
|
||||
"filters": []
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 259 KiB |
Binary file not shown.
Before Width: | Height: | Size: 393 KiB |
Binary file not shown.
Before Width: | Height: | Size: 176 KiB |
Loading…
Reference in New Issue