平铺偏移

This commit is contained in:
李志鹏
2026-01-20 16:11:40 +08:00
parent dbd1651a37
commit 844694d638
4 changed files with 8 additions and 5 deletions

View File

@@ -898,13 +898,14 @@ export default defineComponent({
}
const inputFillOffset = (offset:any)=>{
let arr = editPrintElementData.printStyleList[props.type].overall
arr[editPrintElementData.imgDomIndex].location = [offset.left * offset.size[0] / 100,offset.top * offset.size[1] / 100]
let location = [offset.left * offset.size[0] / 100,offset.top * offset.size[1] / 100]
arr[editPrintElementData.imgDomIndex].location = location
editPrintElementDom.pingpuRef.updataList([
{
action: ACTIONS.UPDATE,
token: arr[editPrintElementData.imgDomIndex].token,
key: 'location[0]',
value: offset.left,
value: location[0],
},
]);
editPrintElementDom.pingpuRef.updataList([
@@ -912,7 +913,7 @@ export default defineComponent({
action: ACTIONS.UPDATE,
token: arr[editPrintElementData.imgDomIndex].token,
key: 'location[1]',
value: offset.top,
value: location[1],
},
]);
// editPrintElementData.overallDetail.offsetX = offset.left

View File

@@ -92,6 +92,7 @@
let img = new Image();
let size = [0,0];
img.src = props.sketchPath;
console.log(props.sketchPath)
await new Promise((resolve, reject) => {
img.onload = () => {
size = [img.width, img.height]