From 6d9c7087e90ec04f2fff4dcf2ba05910ccd2924e Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 6 Sep 2026 11:50:00 +0900 Subject: [PATCH] =?UTF-8?q?fix(B05,B06):=203D=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EA=B3=A0=EB=A5=B8=20=EA=B5=AC=EC=A1=B0=EB=AC=BC=EC=9D=B4=20B06?= =?UTF-8?q?=20=ED=9A=A1=EB=8B=A8=EB=8F=84=EC=97=90=20=EC=95=88=20=EB=9C=A8?= =?UTF-8?q?=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=E2=80=94=20=EC=84=B8=20?= =?UTF-8?q?=EC=9E=90=EB=A6=AC=20=EC=88=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2026-09-05 사용자 지시 건. 넘김 자체는 서 있었고 값이 중간에 지워지거나 대조에서 떨어지고 있었다. - 부재키가 지워지던 길 — 3D 로 고른 뒤 선택 동기화가 **측점만** 다시 적어 부재키를 덮었다. 같은 측점이면 이미 적힌 부재키를 지키게 함(모든 호출자에 함께 적용). - 측점 대조 허용오차 0.01m → 0.05m. 같은 화면의 다른 대조와 같은 값이며, 3D 가 준 누가거리가 소수점 아래에서 조금만 달라도 측점을 못 찾고 조용히 끝나던 원인. - 「진입당 한 번」 빗장을 넘김값 서명 비교로 교체 — 자료가 늦게 와도 다시 서고, 같은 값이면 재렌더에도 스크롤이 안 튄다. Co-Authored-By: Claude Opus 5 (1M context) --- .../B05_Profile_UI_Structure_Pick_Session.ts | 7 ++++++- B06_Section/B06_Section_UI_Page.ts | 15 +++++++++------ B06_Section/B06_Section_UI_Page_Structure_Pick.ts | 4 +++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/B05_Profile/B05_Profile_UI_Structure_Pick_Session.ts b/B05_Profile/B05_Profile_UI_Structure_Pick_Session.ts index d19da5f3..a0214bf3 100644 --- a/B05_Profile/B05_Profile_UI_Structure_Pick_Session.ts +++ b/B05_Profile/B05_Profile_UI_Structure_Pick_Session.ts @@ -38,7 +38,12 @@ export function writeStructurePick( key?: string, ): void { if (!projectId) return; - writeState("structure-pick", at === null ? null : { at, key }, projectId); + if (at === null) return writeState("structure-pick", null, projectId); + // 부재키 없이 **측점만** 오는 길(사이드 목록·선택 동기화)이 3D 로 고른 부재키를 지웠다 + // (2026-09-05 진단). 같은 측점이면 이미 적힌 부재키를 지킨다 — 3D 로 고른 직후 선택 + // 동기화가 이 길을 타도 조정창이 그대로 열린다. + const kept = key ?? readStructurePick(projectId)?.key; + writeState("structure-pick", { at, key: kept }, projectId); } /** 세션에 남은 선택을 읽는다(지우지 않는다). 없으면 null. */ diff --git a/B06_Section/B06_Section_UI_Page.ts b/B06_Section/B06_Section_UI_Page.ts index 572bd29c..fca207d7 100644 --- a/B06_Section/B06_Section_UI_Page.ts +++ b/B06_Section/B06_Section_UI_Page.ts @@ -521,13 +521,16 @@ export async function renderB06ProfileCross(root: HTMLElement): Promise { } /** 세션에 남은 선택을 이어받는다(2026-09-04 — 두 화면이 한 페이지처럼). - * 진입당 한 번만 — 재렌더마다 다시 돌면 사용자가 옮긴 스크롤이 튄다. 관 목록이 - * 늦게 오는 몫은 패널 load()가 스스로 다시 세운다. */ - let pickRestored = false; + * **넘김값이 바뀌었을 때만** 적용한다 — 재렌더마다 다시 돌면 사용자가 옮긴 스크롤이 + * 튀고, 진입당 한 번으로 막으면 자료가 늦게 온 경우 영영 안 열린다(2026-09-06). */ + let appliedPick: string | null = null; function restoreStructurePick(): void { - if (pickRestored || !sectionDetail) return; - pickRestored = true; - applyStructurePick(readStructurePick(projectId), sectionDetail, { + if (!sectionDetail) return; + const handoff = readStructurePick(projectId); + const signature = handoff ? `${handoff.at}|${handoff.key ?? ""}` : null; + if (signature === null || signature === appliedPick) return; + appliedPick = signature; + applyStructurePick(handoff, sectionDetail, { focusStation: (stationId) => sectionView.focusStation(stationId), refreshCard: (chainageM) => sectionView.refreshCard(chainageM), revetSelect: (chainageM, key) => stationControls.revetOffset.select(chainageM, key), diff --git a/B06_Section/B06_Section_UI_Page_Structure_Pick.ts b/B06_Section/B06_Section_UI_Page_Structure_Pick.ts index 8682eac3..45f45bcb 100644 --- a/B06_Section/B06_Section_UI_Page_Structure_Pick.ts +++ b/B06_Section/B06_Section_UI_Page_Structure_Pick.ts @@ -38,8 +38,10 @@ export function applyStructurePick( targets: PickTargets, ): void { if (!handoff) return; + // 허용오차는 같은 화면의 다른 대조와 같은 0.05m 다 — 0.01m 로는 3D 가 준 누가거리가 + // 소수점 아래에서 조금만 달라도 그 측점을 못 찾고 조용히 끝났다(2026-09-05 진단). const target = detail?.cross_sections.find( - (section) => Math.abs(section.chainage_m - handoff.at) < 0.01, + (section) => Math.abs(section.chainage_m - handoff.at) < 0.05, ); if (!target) return; // 조정창은 앞칸(측 이름)만 본다 — 뒤칸은 3D 강조를 부재 하나로 좁히는 몫이다.