From 402800435d1938ac3f2964f3b39b15292c5355d8 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 6 Sep 2026 17:22:43 +0900 Subject: [PATCH] =?UTF-8?q?feat(B05):=20=EC=9C=A0=ED=86=A0=EA=B3=A1?= =?UTF-8?q?=EC=84=A0=20=EC=A0=84=EC=B2=B4=20=EB=A7=9E=EC=B6=A4=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=B8=A1=EC=A0=90=EC=84=A0=20=EC=88=A8=EA=B9=80?= =?UTF-8?q?=C2=B7=EC=A2=8C=EC=9A=B0=20=EC=97=AC=EB=B0=B1=20=EC=B6=95?= =?UTF-8?q?=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 전체 맞춤(토량 분배) 보기는 측점 세로선을 그리지 않음 — 67개가 촘촘히 서서 곡선을 덮기만 하고 자리도 못 읽음. 공용 차트에 `hideStations` 축 옵션 신설, 분배를 끄면 예전대로 나옴. - 같은 보기에서 좌우 여백 축소 — 종단과 맞물릴 필요가 없으므로 반 칸 들여쓰기 (originOffset)를 빼고 우측 여백 12px. 곡선이 폭을 다 씀. Co-Authored-By: Claude Opus 5 (1M context) --- B05_Profile/B05_Profile_UI_Profile_MassHaul.ts | 13 ++++++++++++- common_util/common_util_mass_haul_view.ts | 7 ++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/B05_Profile/B05_Profile_UI_Profile_MassHaul.ts b/B05_Profile/B05_Profile_UI_Profile_MassHaul.ts index 8eba82c8..7280947b 100644 --- a/B05_Profile/B05_Profile_UI_Profile_MassHaul.ts +++ b/B05_Profile/B05_Profile_UI_Profile_MassHaul.ts @@ -65,6 +65,8 @@ const OVERLAY_MIN_HEIGHT = 160; /** 유토곡선 오버레이 최소 높이 — 메인 패널 하한 계산(Profile_Panel)이 함께 쓴다. */ export const MASSHAUL_MIN_HEIGHT = OVERLAY_MIN_HEIGHT; const OVERLAY_DEFAULT_HEIGHT = 280; +/** 전체 맞춤(토량 분배) 보기의 우측 여백(px) — 마지막 점의 값 글자가 잘리지 않을 만큼만. */ +const MASS_FIT_PAD_RIGHT = 12; /** 오버레이가 패널 본문을 다 덮지 않게 남기는 상한 비율. */ const OVERLAY_MAX_RATIO = 0.8; /** 리사이저가 높이를 담는 CSS 변수 — CSS 기본값(280px)은 OVERLAY_DEFAULT_HEIGHT와 같아야 한다. */ @@ -425,10 +427,19 @@ export function createRouteMassHaulPanel( // 토량 분배를 켜면 **곡선 전체가 한 화면에** 들어와야 한다(2026-09-06 사용자 지시). // 평형선·운반 블록은 노선 전체를 놓고 읽는 그림이라, 종단 그래프와의 X 맞춤(가로 // 스크롤)과 보이는 구간만 보는 Y 창을 둘 다 버리고 스크롤러 안쪽 폭·전 구간 Y로 그린다. + // 종단과 맞물릴 필요가 없으므로 반 칸 들여쓰기(originOffset)도 쓰지 않는다 — 그만큼 + // 좌우가 비어 곡선이 가운데로 쪼그라들었다(2026-09-06 사용자 보고: 「우측 여유 과다」). const fitAll = haulPlan !== null; const widthPx = fitAll ? scroll.clientWidth || params.widthPx : params.widthPx; const chartAxis = fitAll - ? { ...params.axis, viewRange: undefined, window: undefined } + ? { + ...params.axis, + padLeft: params.axis.axisX ?? params.axis.padLeft, + padRight: MASS_FIT_PAD_RIGHT, + viewRange: undefined, + window: undefined, + hideStations: true, + } : { ...params.axis, window: windowState }; let massAxis: { padLeft: number; ticks: Array<{ y: number; label: string }> } | null = null; diff --git a/common_util/common_util_mass_haul_view.ts b/common_util/common_util_mass_haul_view.ts index 4ef8c6fc..06149fb2 100644 --- a/common_util/common_util_mass_haul_view.ts +++ b/common_util/common_util_mass_haul_view.ts @@ -51,6 +51,11 @@ export interface MassHaulAxis { viewRange?: { fromM: number; toM: number }; /** 세로창 버티기·부드러운 이동 상태. 넘기면 창이 한 칸에 확 튀지 않는다(2026-09-04). */ window?: MassHaulWindowState; + /** + * 측점 세로선을 그리지 않는다. 곡선 전체를 한 화면에 눌러 담는 보기(토량 분배)에서는 + * 측점선이 촘촘해 곡선을 덮기만 하고 자리도 못 읽는다(2026-09-06 사용자 지시). + */ + hideStations?: boolean; } /** @@ -535,7 +540,7 @@ export function createMassHaulChart( // 측점선 — 종단도와 같은 자리에 서고, 눌러서 측점을 고를 수 있다(3자 선택 동기화). // 라벨은 바로 위 종단면도가 이미 달고 있어 여기서는 생략한다(중복 표기 방지). - for (const station of longitudinal.stations) { + for (const station of axis.hideStations ? [] : longitudinal.stations) { const stationX = x(station.chainage_m); const selected = station.station_id === selectedStationId; const marker = svgElement("g", {