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