From 76a53c64d9438b659588f488bde76a777a939d74 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 12 May 2026 17:25:17 +0900 Subject: [PATCH] =?UTF-8?q?[1961]=20strict=20y1=3D=3D=3Dy2=20drift=202?= =?UTF-8?q?=EA=B3=B3=20=EC=88=98=EC=A0=95=20=E2=80=94=20tolerance=200.5=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useMovementSetting.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hooks/roofcover/useMovementSetting.js b/src/hooks/roofcover/useMovementSetting.js index 22b48f52..9c2910d1 100644 --- a/src/hooks/roofcover/useMovementSetting.js +++ b/src/hooks/roofcover/useMovementSetting.js @@ -379,7 +379,10 @@ export function useMovementSetting(id) { let linePosition = result.position //console.log("1111linePosition:::::", direction, linePosition); - if (target.y1 === target.y2) { + // [라디오 토글 drift 2026-05-12] strict y1===y2 는 (-1153,-1153.1) 같은 0.1 drift 케이스에서 + // false → 수직 분기로 떨어져 top/bottom 라디오 갱신 코드 미실행 → 桁을 上げる 고정 버그. + // line 311 과 동일한 tolerance(0.5) 적용. + if (Math.abs(target.y1 - target.y2) < 0.5) { //수평벽 const setRadioStates = (isUp) => { @@ -847,7 +850,10 @@ export function useMovementSetting(id) { .filter((line) => Math.sqrt(Math.pow(line.line.x2 - line.line.x1, 2) + Math.pow(line.line.y2 - line.line.y1, 2)) >= 1) .forEach((targetItem, __iter) => { const currentLine = targetItem.line - const __horizCurr = currentLine.y1 === currentLine.y2 + // [방향 가드 drift 2026-05-12] strict y1===y2 는 UI/Big.js round 로 (-1153, -1153.1) 같은 + // 0.1 drift 케이스에서 false → 수직 오판정 → FIX-2 가드가 정상 수평 라인을 skip. + // 동일 파일 line 575 (Math.abs<0.2) 와 feedback_same_point_tolerance 메모리에 맞춰 0.5 tolerance. + const __horizCurr = Math.abs(currentLine.y1 - currentLine.y2) < 0.5 // [FIX-2] UP_DOWN 한정: mixed-orientation 가드. linePosition 가족과 currentLine 방향 불일치 → 이 라인 skip. // FLOW_LINE 에서는 lineVector 가 이미 방향별로 targetBaseLines 를 필터링 → 별도 가드 불필요.