#1525 면형상 배치 길이 다른 현상 수정

This commit is contained in:
hyojun.choi 2026-03-09 10:26:03 +09:00
parent 516d3b32a1
commit d4cca0a54d

View File

@ -208,6 +208,13 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
isXInversion: xInversion,
isYInversion: yInversion,
})
// 최초 생성 시 planeSize를 계산된 길이로 저장 (회전 후 좌표 반올림에 의한 오차 방지)
batchSurface.lines.forEach((line) => {
if (!line.attributes.planeSize || line.attributes.planeSize === 0) {
line.attributes.planeSize = line.getLength()
}
})
canvas.setActiveObject(batchSurface)
setSurfaceShapePattern(batchSurface, roofDisplay.column)
drawDirectionArrow(batchSurface)
@ -375,9 +382,9 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
}
points = [
{ x: pointer.x, y: pointer.y - parseInt(newLength2) / 2 },
{ x: pointer.x - parseInt(length1) / 2, y: pointer.y + parseInt(newLength2) / 2 },
{ x: pointer.x + parseInt(length1) / 2, y: pointer.y + parseInt(newLength2) / 2 },
{ x: pointer.x, y: pointer.y - newLength2 / 2 },
{ x: pointer.x - length1 / 2, y: pointer.y + newLength2 / 2 },
{ x: pointer.x + length1 / 2, y: pointer.y + newLength2 / 2 },
]
break