모듈 우측방향 설치 살짝 보정

This commit is contained in:
yjnoh 2025-02-09 19:47:22 +09:00
parent 602cd4d74b
commit 5cee1ec145

View File

@ -1247,9 +1247,7 @@ export function useModuleBasicSetting(tabNum) {
let diffTopEndPoint = Math.abs(totalTopEndPoint / height)
let totalHeight = Math.ceil(Math.abs(maxBottomEndPoint - maxTopEndPoint) / height)
let totalWidth = Math.abs(startPoint.x1 - maxLeftEndPoint) / width
let startRowPoint = startPoint.y1 - height * Math.ceil(diffTopEndPoint) // -3으로 위치살짝 보정1
console.log('startRowPoint', startRowPoint)
let startRowPoint = startPoint.y1 - height * Math.ceil(diffTopEndPoint) - 4 // -3으로 위치살짝 보정1
let tempMaxHeight = isMaxSetup ? height / 2 : height //최대배치인지 확인하려고 넣음
if (isMaxSetup) totalHeight = totalHeight * 2 //최대배치시 2배로 늘려서 반씩 검사
@ -1513,16 +1511,16 @@ export function useModuleBasicSetting(tabNum) {
const pointX2 = coords[2].x + ((coords[2].y - top) / (coords[2].y - coords[1].y)) * (coords[1].x - coords[2].x)
const pointY2 = top
const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], {
stroke: 'red',
strokeWidth: 1,
selectable: true,
})
// const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], {
// stroke: 'red',
// strokeWidth: 1,
// selectable: true,
// })
console.log(`index ${index} : finalLine`, pointX1, pointY1, pointX2, pointY2)
// console.log(`index ${index} : finalLine`, pointX1, pointY1, pointX2, pointY2)
canvas?.add(finalLine)
canvas?.renderAll()
// canvas?.add(finalLine)
// canvas?.renderAll()
let rtnObj
//평평하면
@ -1639,13 +1637,13 @@ export function useModuleBasicSetting(tabNum) {
const pointX2 = top
const pointY2 = coords[2].y + ((coords[2].x - top) / (coords[2].x - coords[1].x)) * (coords[1].y - coords[2].y)
const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], {
stroke: 'red',
strokeWidth: 1,
selectable: true,
})
canvas?.add(finalLine)
canvas?.renderAll()
// const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], {
// stroke: 'red',
// strokeWidth: 1,
// selectable: true,
// })
// canvas?.add(finalLine)
// canvas?.renderAll()
let rtnObj
//평평하면