Merge pull request '외벽선 편집 및 오프셋 길이 계산 수정' (#779) from dev into dev-deploy

Reviewed-on: #779
This commit is contained in:
ysCha 2026-04-14 15:04:59 +09:00
commit e8aadf526a

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 = {