오프셋 설정에 시 길이 반영 제대로 안되는 현상 수정

This commit is contained in:
hyojun.choi 2026-06-12 18:29:17 +09:00
parent 48fa507046
commit 96585240ef

View File

@ -516,6 +516,14 @@ export function useWallLineOffsetSetting(id) {
} }
} }
// 좌표가 변경된 라인의 planeSize/actualSize 재계산 — 길이 라벨은 attributes.planeSize 저장값을 표시하므로
// 재계산 없이 fire('modified') 만 하면 이전 길이가 그대로 남는다.
;[currentLine, prevLine, nextLine].forEach((line) => {
if (!line?.attributes) return
const newSize = calcLinePlaneSize({ x1: line.x1, y1: line.y1, x2: line.x2, y2: line.y2 })
line.attributes = { ...line.attributes, planeSize: newSize, actualSize: newSize }
})
const newOuterLines = canvas.getObjects().filter((obj) => obj.name === 'outerLine') const newOuterLines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
newOuterLines.sort((a, b) => a.idx - b.idx) newOuterLines.sort((a, b) => a.idx - b.idx)
newOuterLines.forEach((line, idx) => { newOuterLines.forEach((line, idx) => {