From beeeeb32e58da513241a976004818bf42d87a03a Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 29 Apr 2026 18:31:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=88=EB=A3=A8=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useMovementSetting.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/hooks/roofcover/useMovementSetting.js b/src/hooks/roofcover/useMovementSetting.js index fccf759b..25ba502f 100644 --- a/src/hooks/roofcover/useMovementSetting.js +++ b/src/hooks/roofcover/useMovementSetting.js @@ -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 ? '수평' : '수직'} ` + -- 2.47.2