From 5ac61cb4ccccd90fcbdeec6368c0e5ae709b7c64 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 23 Aug 2026 18:34:50 +0900 Subject: [PATCH] =?UTF-8?q?fix(B06):=20=E2=A4=A2(=EC=98=A4=ED=86=A0?= =?UTF-8?q?=ED=95=8F)=20=EA=B8=B0=EB=B3=B8=EA=B0=92=EC=9D=84=20=EC=A0=84?= =?UTF-8?q?=EC=97=AD=20=ED=9A=A1=EB=8B=A8=20=EB=B0=98=ED=8F=AD=20=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=EA=B0=92=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⤢가 항상 교차점 맞춤 폭으로 가서 전역 보기값보다 좁아지기도 했다. 이제 초기화는 전역 보기값이 기본이고, 그 폭에서 절·성토선과 원지반 교차점이 안 보이는 측점만 교차점이 보이는 폭(그 측점의 기본값)으로 되돌린다(2026-08-23 사용자 지시). Co-Authored-By: Claude Opus 5 (1M context) --- B06_Section/B06_Section_UI_Cross_View.ts | 8 ++++++-- B06_Section/B06_Section_UI_Cross_View_Zoom.ts | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/B06_Section/B06_Section_UI_Cross_View.ts b/B06_Section/B06_Section_UI_Cross_View.ts index bcee0c87..9de63027 100644 --- a/B06_Section/B06_Section_UI_Cross_View.ts +++ b/B06_Section/B06_Section_UI_Cross_View.ts @@ -613,9 +613,13 @@ export function createCrossSectionCard( section.chainage_m, Math.round((effectiveHalfWidth ?? maxOffset) + deltaM), ), + // ⤢ = 초기화. 기본은 **전역 횡단 반폭 보기값**으로 되돌리고, 그 폭 안에서는 + // 절·성토선과 원지반의 교차점이 안 보이는 측점만 교차점이 보이는 폭으로 되돌린다 + // (2026-08-23 사용자 지시 — 그 측점의 기본값이 그 폭이라는 뜻). fit: () => { - const fitted = toeFitHalfWidth(section); - if (fitted !== null) stationWidth.request(section.chainage_m, fitted); + const base = crossHalfWidth ?? maxOffset; + const needed = toeFitHalfWidth(section); + stationWidth.request(section.chainage_m, needed !== null && needed > base ? needed : base); }, }; chartWrap.append(svg, readout.root, buildZoomControls(zoomPan, widthActions), panel.root); diff --git a/B06_Section/B06_Section_UI_Cross_View_Zoom.ts b/B06_Section/B06_Section_UI_Cross_View_Zoom.ts index 8d18cd1d..271cd768 100644 --- a/B06_Section/B06_Section_UI_Cross_View_Zoom.ts +++ b/B06_Section/B06_Section_UI_Cross_View_Zoom.ts @@ -27,7 +27,10 @@ export interface ZoomPanHandle { export interface CrossWidthActions { /** 표시 반폭을 deltaM(m)만큼 조절한다. 계산 반폭을 넘으면 페이지가 재생성까지 처리. */ step: (deltaM: number) => void; - /** 절·성토 교차점이 모두 보이는 폭으로 맞춘다. */ + /** + * 초기화 — 표시 반폭을 전역 보기값으로 되돌린다. 단 그 폭에서 절·성토선과 원지반의 + * 교차점이 안 보이는 측점은 교차점이 보이는 폭이 그 측점의 기본값이다. + */ fit: () => void; } @@ -196,7 +199,7 @@ export function attachZoomPan( * `width`를 넘기면 **원배율에서만** 버튼이 표시 반폭을 조절한다(2026-08-23 사용자 지시): * + : 배율 확대(항상) * − : 배율>1이면 축소, 원배율이면 표시 반폭 +1m(계산 반폭 20m를 넘으면 백엔드 재계산) - * ⤢ : 배율 원복 + 절·성토 교차점이 다 보이는 폭으로 맞춤 + * ⤢ : 배율 원복 + 표시 반폭 초기화(전역 보기값, 교차점이 안 보이면 보이는 폭까지) */ export function buildZoomControls(handle: ZoomPanHandle, width?: CrossWidthActions): HTMLElement { const bar = document.createElement("div");