From c100daabcee6e0c382015423e62fccdb3a2c76b1 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 29 Aug 2026 18:37:16 +0900 Subject: [PATCH] =?UTF-8?q?fix(B06):=20=EA=B3=A0=EB=A5=B8=20=EA=B2=83=20?= =?UTF-8?q?=EC=97=86=EC=9D=B4=20=ED=8F=BC=EC=9D=84=20=EB=A7=8C=EC=A7=80?= =?UTF-8?q?=EB=A9=B4=20=EC=9D=B4=EC=9C=A0=EB=A5=BC=20=EC=95=8C=EB=A6=B0?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 좌측 폼의 실시간 반영은 **고른 항목**에만 걸린다. 아무것도 고르지 않은 상태에서 형태·높이를 바꾸면 값이 조용히 버려져 "형태별 모양이 안 그려진다"로 보였다. 패널에 hasSelection()을 열고, B06에서 선택 없이 폼이 바뀌면 안내한다. Co-Authored-By: Claude Opus 5 (1M context) --- B05_Profile/B05_Profile_UI_Structures_Panel.ts | 4 ++++ B06_Section/B06_Section_UI_Page_Structures_Panel.ts | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/B05_Profile/B05_Profile_UI_Structures_Panel.ts b/B05_Profile/B05_Profile_UI_Structures_Panel.ts index 3e20ca25..49a37b3f 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Panel.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Panel.ts @@ -79,6 +79,9 @@ export interface StructuresSection { setPipeFacilities: (pipes: PipeFacilityItem[]) => void; /** 그래프·3D에서 고른 계곡 통과 시설을 목록에서 강조한다(null = 해제). */ selectPipeByChainage: (chainageM: number | null) => void; + /** 지금 폼이 **어떤 항목을 고쳐 쓰는 중**인가 — 선택이 없으면 폼 값은 아무 데도 + * 가지 않는다(B06에서 그 상태를 안내하는 데 쓴다, 2026-08-30). */ + hasSelection: () => boolean; /** 종단도·3D에서 고른 구조물을 폼에 올린다. null이면 선택 해제. */ selectById: (structureId: string | null) => void; /** 종단 그래프 우클릭으로 타입을 지정해 추가한다. */ @@ -928,6 +931,7 @@ export function createStructuresSection(callbacks: StructuresCallbacks): Structu root, facility: facilityOptions, listRoot: list, + hasSelection: () => editingId !== null || selectedPipeChainage !== null, setTypes(next) { types = next; const groups = [...new Set(next.map((t) => t.group))]; diff --git a/B06_Section/B06_Section_UI_Page_Structures_Panel.ts b/B06_Section/B06_Section_UI_Page_Structures_Panel.ts index 9ff174f4..d167bfe9 100644 --- a/B06_Section/B06_Section_UI_Page_Structures_Panel.ts +++ b/B06_Section/B06_Section_UI_Page_Structures_Panel.ts @@ -30,6 +30,8 @@ import type { StationControls } from "./B06_Section_UI_Page_Station_Controls"; const PIPE_ADD_GUIDE = "계곡 통과 시설의 추가·삭제는 B05(종단) 화면에서 합니다."; const PIPE_MOVE_GUIDE = "기준 측점 이동은 배수유역을 다시 나눠야 해 B05(종단) 화면에서 합니다."; +/** 고른 것 없이 폼만 만졌을 때 — 값이 어디로도 가지 않으므로 이유를 알린다. */ +const PIPE_PICK_GUIDE = "먼저 횡단도나 목록에서 구조물을 고르세요 — 고른 것에만 값이 반영됩니다."; const PIPE_MOVE_NOTICE = "기준 측점을 옮겼습니다 — 세부 배수유역과 횡단도는 [저장]·[확정] 뒤에 다시 계산됩니다."; @@ -198,6 +200,13 @@ export function createB06StructuresPanel(deps: B06StructuresPanelDeps): B06Struc }, }); + // 고른 것 없이 좌측 폼을 만지면 값이 아무 데도 가지 않는다(패널 실시간 반영이 + // 선택된 항목에만 걸린다) — 조용히 무시되던 자리라 이유를 알린다(2026-08-30 사용자: + // "형태에 따라 모양을 넣어주는 기능이 누락되는 경우가 있어"의 원인). + section.facility.root.addEventListener("change", () => { + if (!section.hasSelection()) showToast(PIPE_PICK_GUIDE, "error"); + }); + // 하위 [횡단 조정] 컨테이너 — 폼 본문 맨 아래, 기존 항목과 경계 구분(2026-08-29 // 사용자: 병합 항목은 하위 컨테이너로 담아 혼동 방지). resetAdjustDock();