Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -233,12 +233,10 @@ export default defineComponent({
|
|||||||
let sketchH = editPrintElementData.sketchWH.height * editPrintElementData.sketchWH.scale[1]
|
let sketchH = editPrintElementData.sketchWH.height * editPrintElementData.sketchWH.scale[1]
|
||||||
let x = sketchW / 2 - (sketchW * (width / editPrintElementData.sketchWH.width)/2)
|
let x = sketchW / 2 - (sketchW * (width / editPrintElementData.sketchWH.width)/2)
|
||||||
let y = sketchH / 2 -(sketchH * height/2)
|
let y = sketchH / 2 -(sketchH * height/2)
|
||||||
if(!editPrintElementData.stateOverallSingle == 'single'){
|
if(editPrintElementData.stateOverallSingle !== 'single'){
|
||||||
x = sketchW / 2
|
x = sketchW / 2
|
||||||
y = sketchH / 2
|
y = sketchH / 2
|
||||||
}
|
}
|
||||||
x = sketchW / 2
|
|
||||||
y = sketchH / 2
|
|
||||||
let location = [x,y]
|
let location = [x,y]
|
||||||
resolve({scale,location})
|
resolve({scale,location})
|
||||||
}
|
}
|
||||||
@@ -248,7 +246,7 @@ export default defineComponent({
|
|||||||
const addPrintELement = async (data:any)=>{
|
const addPrintELement = async (data:any)=>{
|
||||||
if(!editPrintElementData.isSketchLoad)return
|
if(!editPrintElementData.isSketchLoad)return
|
||||||
let {scale,location} = await setScaleLocation(data)
|
let {scale,location} = await setScaleLocation(data)
|
||||||
let printIndex = 0
|
let printIndex = 1
|
||||||
let allElementPrint = []
|
let allElementPrint = []
|
||||||
if(props.type == 'print'){
|
if(props.type == 'print'){
|
||||||
allElementPrint = [
|
allElementPrint = [
|
||||||
@@ -262,9 +260,9 @@ export default defineComponent({
|
|||||||
...(editPrintElementData.selectDetail.printObject.prints || []),
|
...(editPrintElementData.selectDetail.printObject.prints || []),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
if(allElementPrint.length >= 1){
|
||||||
printIndex = Math.max(...allElementPrint.map(item => Number(item.priority))) + 1
|
printIndex = Math.max(...allElementPrint.map(item => Number(item.priority))) + 1
|
||||||
console.log(printIndex)
|
}
|
||||||
let item = {
|
let item = {
|
||||||
angle:0,
|
angle:0,
|
||||||
designType:data.designType,
|
designType:data.designType,
|
||||||
@@ -359,7 +357,6 @@ export default defineComponent({
|
|||||||
top = item.location[1] / editPrintElementData.sketchWH.scale[1]
|
top = item.location[1] / editPrintElementData.sketchWH.scale[1]
|
||||||
}else{
|
}else{
|
||||||
//overall
|
//overall
|
||||||
console.log(item)
|
|
||||||
left = item.location[0] / editPrintElementData.sketchWH.scale[0]
|
left = item.location[0] / editPrintElementData.sketchWH.scale[0]
|
||||||
top = item.location[1] / editPrintElementData.sketchWH.scale[1]
|
top = item.location[1] / editPrintElementData.sketchWH.scale[1]
|
||||||
item.scale = [1,1]
|
item.scale = [1,1]
|
||||||
|
|||||||
Reference in New Issue
Block a user