平铺偏移
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user