From 322cd150cc2dd286f14da72a150f2cfb63a345e8 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Mon, 5 Oct 2026 14:03:19 +0900 Subject: [PATCH] =?UTF-8?q?fix(B05):=2046-5=20=EC=98=B5=EC=85=98=20?= =?UTF-8?q?=EA=B7=B8=EB=A3=B9=20=EC=83=81=EC=9E=90=20=E2=80=94=20=EC=88=A8?= =?UTF-8?q?=EC=9D=80=20=EC=B9=B8=EC=9D=80=20=EC=95=88=20=EC=98=AE=EA=B9=80?= =?UTF-8?q?=20=C2=B7=20=EC=8B=9C=EC=84=A4=20=EA=B0=88=EB=9E=98=EA=B0=80=20?= =?UTF-8?q?=EB=B0=94=EB=80=8C=EB=A9=B4=20=EB=8B=A4=EC=8B=9C=20=EC=84=B8?= =?UTF-8?q?=EC=9B=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 화면 검증에서 찾음: 숨어 있던 독립 기슭막이 칸(같은 키)까지 상자로 옮겨 두 벌로 보임 - 숨은 조상이 있는 칸은 제자리 · 유입구 구조 등 시설 칸이 바뀌면 그룹 상자도 다시 세움 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MPcuokNm1ZR2kqgGGDfaJA --- B05_Profile/B05_Profile_UI_Structures_Groups.ts | 12 ++++++++++-- B05_Profile/B05_Profile_UI_Structures_Panel.ts | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/B05_Profile/B05_Profile_UI_Structures_Groups.ts b/B05_Profile/B05_Profile_UI_Structures_Groups.ts index c4f75cb0d..1f7fce79d 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Groups.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Groups.ts @@ -102,8 +102,16 @@ export function createGroupBoxes(): GroupBoxes { body.className = "b05-structure__grid"; for (const scope of scopes) { const marked = [...scope.querySelectorAll("[data-option-keys]")]; - const fits = marked.filter((node) => - (node.dataset.optionKeys ?? "").split(" ").every((key) => key && keys.has(key)), + // 지금 숨은 칸(다른 시설 몫 · 안 고른 갈래)은 그 자리에 둠 — 같은 키 칸이 두 벌 옮겨 오지 않게 + const shown = (node: HTMLElement): boolean => { + for (let at: HTMLElement | null = node; at && at !== scope; at = at.parentElement) + if (at.hidden) return false; + return true; + }; + const fits = marked.filter( + (node) => + shown(node) && + (node.dataset.optionKeys ?? "").split(" ").every((key) => key && keys.has(key)), ); // 바깥 칸만 — 옮길 칸 안의 칸은 따라 옴 for (const node of fits.filter((n) => !fits.some((o) => o !== n && o.contains(n)))) { diff --git a/B05_Profile/B05_Profile_UI_Structures_Panel.ts b/B05_Profile/B05_Profile_UI_Structures_Panel.ts index 7989e539c..149903454 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Panel.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Panel.ts @@ -66,7 +66,8 @@ export function createStructuresSection( // 폼 뼈대는 전용 조립기가 세운다(2026-09-03 · 700줄 제한) — 여기서는 값·검증·저장만. const form = buildStructuresForm({ getInterval: () => callbacks.getInterval(), - onFacilityChange: () => liveCommit(), + // 갈래(유입구 구조 등)가 바뀌면 보이는 칸이 달라짐 — 그룹 상자도 다시 세움(PLAN 46-3) + onFacilityChange: () => (regroup(), liveCommit()), }); const { root,