From 7cc20f33c6497e15255298394f06b51cbe243f1e Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 22 Oct 2025 17:28:16 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8F=99,=ED=98=84=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?=EB=8F=99=EC=9D=BC=EB=9D=BC=EC=9D=B8=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD,=20=EC=83=81=EC=9A=B0=EC=84=A0=ED=83=9D?= =?UTF-8?q?=EC=8B=9C=20=EC=B4=88=EA=B8=B0=ED=99=94=20=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useMovementSetting.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/hooks/roofcover/useMovementSetting.js b/src/hooks/roofcover/useMovementSetting.js index 08b31f4d..5e801912 100644 --- a/src/hooks/roofcover/useMovementSetting.js +++ b/src/hooks/roofcover/useMovementSetting.js @@ -198,8 +198,16 @@ export function useMovementSetting(id) { if (type === TYPE.FLOW_LINE) { FLOW_LINE_REF.POINTER_INPUT_REF.current.value = '' FLOW_LINE_REF.FILLED_INPUT_REF.current.value = '' - FLOW_LINE_REF.DOWN_LEFT_RADIO_REF.current.checked = true - FLOW_LINE_REF.UP_RIGHT_RADIO_REF.current.checked = false + + if (FLOW_LINE_REF.UP_RIGHT_RADIO_REF.current.checked || FLOW_LINE_REF.DOWN_LEFT_RADIO_REF.current.checked) { + // If one is checked, uncheck the other + FLOW_LINE_REF.UP_RIGHT_RADIO_REF.current.checked = !FLOW_LINE_REF.DOWN_LEFT_RADIO_REF.current.checked; + FLOW_LINE_REF.DOWN_LEFT_RADIO_REF.current.checked = !FLOW_LINE_REF.UP_RIGHT_RADIO_REF.current.checked; + }else{ + FLOW_LINE_REF.DOWN_LEFT_RADIO_REF.current.checked = true + FLOW_LINE_REF.UP_RIGHT_RADIO_REF.current.checked = false + } + } if (type === TYPE.UP_DOWN) { UP_DOWN_REF.POINTER_INPUT_REF.current.value = '' @@ -348,7 +356,7 @@ export function useMovementSetting(id) { isGableRoof = false } const lineVector = - target.y1 === target.y2 + Math.abs(target.y1 - target.y2) < 0.2 ? FLOW_LINE_REF.UP_RIGHT_RADIO_REF.current.checked ? 'up' : 'down' -- 2.47.2