fix(B05): 종단표 구배 3행 상시 표기

구배 L·H·S 는 값 열을 접는 규칙에서 제외 — 구조물로 좁게 갈라진 구간도 값을 적음
(2026-09-04 사용자 확정, 「각도 행」 = 구배 3행). 그 구간만 고를 때까지 값을 감추던
옛 규칙(2026-08-03)을 걷어내고, 구조물 구간 표시·하이라이트·툴팁은 유지.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-04 09:31:27 +09:00
co-authored by Claude Opus 5
parent 997e94dddb
commit 3b89ba4fac
+5 -15
View File
@@ -265,23 +265,13 @@ function buildSegmentRows(
const span = x(segment.to_m) - left;
const text = spec.cell(segment);
const node = element("span", "b05-profile-table__segment", "");
// 구조물 배치로 갈라진 좁은 구간 값은 처음부터 보이지 않는다 — 블록·경계선·툴팁만 남기고,
// 그 측점을 **선택했을 때** 하이라이트와 함께 값을 보인다(2026-08-03 사용자 지시).
// 구배 3행(L·H·S)은 **늘 보인다** — 구조물로 갈라진 좁은 구간을 적는다
// (2026-09-04 사용자 확정: 값 열을 접는 규칙에서 구배 행은 제외).
// 옛 규칙(2026-08-03: 구조물 구간은 고를 때만 값 표시)은 여기서 걷어냈고,
// 구조물 구간 표시(색·하이라이트)와 툴팁은 그대로 둔다.
const structural = isStructureSegment(segment);
const highlighted = structural && touchesSelected(segment);
if (structural) node.classList.add("is-structure");
if (highlighted) node.classList.add("is-highlight");
if (structural && !highlighted) {
node.style.left = `${left}px`;
node.style.width = `${span}px`;
node.title =
`${segment.from_m.toFixed(1)} ~ ${segment.to_m.toFixed(1)}m 직선 (구조물 구간)
` +
`연장 ${segment.length_m.toFixed(2)}m · 고저차 ${segment.height_m.toFixed(2)}m · ` +
`구배 ${segment.grade_percent.toFixed(2)}%`;
row.append(node);
return;
}
if (structural && touchesSelected(segment)) node.classList.add("is-highlight");
// 값은 표기한다. 가로로 안 들어가면 90도로 세워 블록의 폭(span)·행 높이에 맞춰
// 글자를 줄여 넣는다(작아도 무시 — 값이 아예 안 보이는 것보단 낫다).
const value = element("span", "b05-profile-table__segment-value", text);