- 공용 stationLabel · inferStationInterval 로 한 벌(예 61+14.5) · 서버 label(STA. 꼴) 안 읽음 · 화면만 - E07 — 측점 표 · 지도 측점 글 · 셀 툴팁 · 지도 글 솎음이 20 m 고정 대신 추정 간격 - E04 — 구간 목록 · 위치(가까운 측점) · 지도 측점 글 · 툴팁 · 솎음 간격 - E06 — 위험 띠 · 측점 표 · 상세 제목 · 스테레오넷 제목 · 띠 양 끝 글 - E01 빠진 측점 띠 — interval 인자(기본 20 m · E02 · E03 이 측점 간격을 넘기면 그 값) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.4 KiB
TypeScript
28 lines
1.4 KiB
TypeScript
/* =============================================================================
|
|
* E01_StabRegister_UI_Missing.ts
|
|
* 빠진 횡단 띠(요구 351 · PLAN 532-5) — E02 · E03 화면 위 「횡단 없는 측점 N 개 — 해석에서 빠짐」.
|
|
* 목록 = 서버 `missing_stations`(E01 복사본에 횡단 파일이 없는 측점 누가거리) · 「자세히」로 펼침.
|
|
* 모양 = 띠 알림 부품(경고).
|
|
* ========================================================================== */
|
|
|
|
import { createBanner } from "@ui/ui_template_banner";
|
|
import { el } from "@ui/ui_template_elements";
|
|
import { t } from "@ui/ui_template_locale";
|
|
import { stationLabel } from "../common_util/common_util_station";
|
|
|
|
/** 빠진 측점이 없으면 빈 칸(띠 없음) · 측점 글 = No.+거리 — interval = 측점 간격(부르는 쪽이
|
|
* `inferStationInterval(측점 목록)` 으로 넘김 · 없으면 20 m) */
|
|
export function buildMissingBanner(missing: number[] | undefined, interval = 20): HTMLElement {
|
|
const list = missing ?? [];
|
|
if (!list.length) return el("div");
|
|
const box = createBanner({
|
|
tone: "warning",
|
|
text: t("E_Missing_Head").replace("{n}", String(list.length)),
|
|
details: el("p", { text: list.map((m) => stationLabel(m, interval, 1)).join(" · ") }),
|
|
});
|
|
box.classList.add("e-missing");
|
|
box.dataset.role = "missing-stations";
|
|
box.dataset.count = String(list.length);
|
|
return box;
|
|
}
|