외벽선 편집 및 오프셋 길이 계산 수정 #780

Merged
ysCha merged 1 commits from dev into prd-deploy 2026-04-14 15:05:19 +09:00

View File

@ -8,6 +8,7 @@ import { useSwal } from '@/hooks/useSwal'
import { usePopup } from '@/hooks/usePopup'
import Big from 'big.js'
import { outerLineFixState } from '@/store/outerLineAtom'
import { calcLinePlaneSize } from '@/util/qpolygon-utils'
// 외벽선 편집 및 오프셋
export function useWallLineOffsetSetting(id) {
@ -46,7 +47,13 @@ export function useWallLineOffsetSetting(id) {
direction: direction,
})
line.attributes = { ...currentWallLineRef.current.attributes }
// 분할된 라인의 실제 길이로 planeSize/actualSize 재계산
const newPlaneSize = calcLinePlaneSize({ x1: point1.x, y1: point1.y, x2: point2.x, y2: point2.y })
line.attributes = {
...currentWallLineRef.current.attributes,
planeSize: newPlaneSize,
actualSize: newPlaneSize,
}
}
const TYPES = {