Merge pull request '마루이동' (#805) from dev into prd-deploy

Reviewed-on: #805
This commit is contained in:
ysCha 2026-04-29 18:32:04 +09:00
commit a04e7c6a1b

View File

@ -769,10 +769,14 @@ export function useMovementSetting(id) {
`targetBaseLines=${targetBaseLines.length}`
)
}
// [FIX-1] linePosition='unknown' (또는 없음) 이면 부호 결정 불가 → 이동 자체 스킵.
// 기존: unknown 일 때 negation 안 거치고 부호 그대로 들어가 in/out 의도와 반대로 적용되는 case 발생.
if (linePosition !== 'top' && linePosition !== 'bottom' && linePosition !== 'left' && linePosition !== 'right') {
if (__isLocal) console.warn(`[BR-TRACE] linePosition=${linePosition} → 이동 스킵 (early return)`)
// [FIX-1/2 적용 범위] UP_DOWN(형이동) 에서만 적용.
// FLOW_LINE(마루이동) 은 ridge 가 wall 내부라 getSelectLinePosition 이 'unknown' 반환 →
// early return / 방향 가드 적용 시 wallbaseLine 동반 이동이 통째로 차단됨.
const __isUpDown = typeRef.current === TYPE.UP_DOWN
// [FIX-1] UP_DOWN 한정: linePosition='unknown' 이면 부호 결정 불가 → 이동 자체 스킵.
if (__isUpDown && linePosition !== 'top' && linePosition !== 'bottom' && linePosition !== 'left' && linePosition !== 'right') {
if (__isLocal) console.warn(`[BR-TRACE] (UP_DOWN) linePosition=${linePosition} → 이동 스킵 (early return)`)
roof.drawHelpLine()
initEvent()
closePopup(id)
@ -787,10 +791,9 @@ export function useMovementSetting(id) {
const currentLine = targetItem.line
const __horizCurr = currentLine.y1 === currentLine.y2
// [FIX-2] mixed-orientation 가드: linePosition 가족과 currentLine 방향 불일치 → 이 라인은 스킵.
// gable 보강 push (zeroLengthLines.forEach) 가 좌표 매칭만으로 인접 라인을 추가하면서
// 가로/세로 혼재된 targetBaseLines 가 만들어지는 경우 방어.
if (__horizCurr !== __targetIsHoriz) {
// [FIX-2] UP_DOWN 한정: mixed-orientation 가드. linePosition 가족과 currentLine 방향 불일치 → 이 라인 skip.
// FLOW_LINE 에서는 lineVector 가 이미 방향별로 targetBaseLines 를 필터링 → 별도 가드 불필요.
if (__isUpDown && __horizCurr !== __targetIsHoriz) {
if (__isLocal) {
console.warn(
`[BR-TRACE] iter=${__iter} ⚠️ 방향 불일치 skip: currentLine ${__horizCurr ? '수평' : '수직'} ` +