diff --git a/B05_Profile/B05_Profile_UI_Drainage_Facility.ts b/B05_Profile/B05_Profile_UI_Drainage_Facility.ts index 9bc20070..29856dc2 100644 --- a/B05_Profile/B05_Profile_UI_Drainage_Facility.ts +++ b/B05_Profile/B05_Profile_UI_Drainage_Facility.ts @@ -147,6 +147,9 @@ export interface FacilityOptionsForm { ) => void; /** 현재 필드 값을 시설 옵션으로 읽는다(빈 값 생략). */ readOptions: () => Record; + /** 설계유량만 갱신한다 — 필드 값은 건드리지 않는다. 임시 배치(2026-08-18)의 + * 유역 재계산 결과를 입력 중인 폼에 살짝 반영하는 용도. */ + setDesignFlow: (designFlow: number | null) => void; } /** 구조물 배치 폼의 옵션 자리에 끼워지는 계곡 통과 시설 부속 옵션 서브폼. */ @@ -450,6 +453,10 @@ export function createFacilityOptionsForm( } syncVisibility(); }, + setDesignFlow(designFlow) { + designFlowM3s = designFlow ?? null; + syncVisibility(); + }, readOptions() { const options: Record = {}; if (current === "pipe") { diff --git a/B05_Profile/B05_Profile_UI_Structures_Panel.ts b/B05_Profile/B05_Profile_UI_Structures_Panel.ts index 3437fff4..f83facf2 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Panel.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Panel.ts @@ -446,11 +446,20 @@ export function createStructuresSection(callbacks: StructuresCallbacks): Structu /** 계곡 통과 시설을 폼에 올린다 — 일반 구조물과 같은 흐름(종류·측점·옵션·수정). * 정본이 관 지점이라 editingId 대신 선택 누가거리로 추적한다. */ function loadPipeForm(pipe: PipeFacilityItem): void { - // 임시 배치 중인 그 관이 재계산을 거쳐 되돌아온 경우가 아니면, 다른 항목으로 - // 넘어가는 것이므로 임시 배치를 취소한다. + // 임시 배치 중인 그 관이 재계산을 거쳐 되돌아온 경우 — 사용자가 폼에 입력하는 + // 중이므로 폼을 다시 그리지 않는다(입력이 지워진다, 2026-08-18 사용자 보고). + // 재계산으로 갱신된 설계유량만 살짝 반영하고 선택 표시를 맞춘다. const isTemp = tempPipeChainage !== null && Math.abs(pipe.chainage_m - tempPipeChainage) < 0.05; - if (isTemp) tempPipeChainage = pipe.chainage_m; - else cancelTempPipe(); + if (isTemp) { + tempPipeChainage = pipe.chainage_m; + selectedPipeChainage = pipe.chainage_m; + facilityOptions.setDesignFlow(pipe.design_flow_m3s ?? null); + syncButtons(); + renderList(); + return; + } + // 다른 항목으로 넘어가는 것이므로 임시 배치를 취소한다. + cancelTempPipe(); const hadStructure = editingId !== null; editingId = null; selectedPipeChainage = pipe.chainage_m;