From 52b3dfe616a9c5d67336b4bc4bbe305db0331c6d Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 18 Aug 2026 18:35:21 +0900 Subject: [PATCH] =?UTF-8?q?fix(B05):=20=EC=9E=84=EC=8B=9C=20=EB=B0=B0?= =?UTF-8?q?=EC=B9=98=20=EC=9E=AC=EA=B3=84=EC=82=B0=EC=9D=B4=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20=EC=A4=91=EC=9D=B8=20=ED=8F=BC=EC=9D=84=20=EB=8D=AE?= =?UTF-8?q?=EC=96=B4=EC=93=B0=EB=8D=98=20=EA=B2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기준 측점을 넣으면 임시 배치 → 세부유역 재계산 → 전역 선택 동기화가 그 관의 폼을 통째로 다시 로드해, 잔여거리를 입력하려는 순간 칸이 비워졌다(2026-08-18 사용자 보고). 임시 배치 중 그 관이 동기화로 되돌아오면 폼은 그대로 두고 설계유량만 갱신한다 (facilityOptions.setDesignFlow 신설 — 필드 값 불변, 월류 높이 재계산만). Co-Authored-By: Claude Opus 5 (1M context) --- B05_Profile/B05_Profile_UI_Drainage_Facility.ts | 7 +++++++ B05_Profile/B05_Profile_UI_Structures_Panel.ts | 17 +++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) 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;