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();