Files
Aislo/B05_Profile/B05_Profile_UI_RouteEdit_Marks.ts
T
eomsangdonandClaude Opus 5.5 a108c3ae11 feat(B05 평면 도구줄): 구분선 · 스냅 간격 고르기 · Ctrl+휠 5° 회전 · [기울기] 기본 꺼짐 (390-1 · 2 · 3)
- [측점 스냅] · 간격 | 분석 지형 구분선(분석 지형 숨으면 같이 숨김) · [기울기] 기본 끔
- 스냅 간격 0.1 · 1 · 10 m · 측점 No.(기본) — 프로젝트별 화면 기억 · 스냅 끔이면 흐림 · MC 를 간격 배수에 · 허용 오차 간격 따라(0.1 m = 0.005 m)
- Ctrl+휠 한 칸 5° 회전(단추 15° 그대로 · 손가락 · 트랙패드 벌림 = 확대 · 추천 지도 안 돎) · 도움말 한 줄

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
2026-10-17 17:17:51 +09:00

31 lines
1.3 KiB
TypeScript

/* =============================================================================
* B05_Profile_UI_RouteEdit_Marks.ts
* 노선 편집 평면 [측점] [기울기] 켬끔(요구 241-11).
*
* [측점] 끔 = 측점 눈금 · 번호 안 그림 · 눈금 집기 안 함(시점 · 종점 이름표는 남음).
* [기울기] 끔 = 측점 사이 기울기 라벨 안 그림 → 높이도 안 물음.
* 켬끔은 이 페이지 동안만(기본 [측점] 켬 · [기울기] 끔(요구 242-17) · 계정 설정 아님) — `_Footprint` 와 같은 꼴.
* ========================================================================== */
import { scheduleRedraw } from "./B05_Profile_UI_RouteEdit_Footprint";
export type RouteEditMark = "stations" | "slopes";
const shown: Record<RouteEditMark, boolean> = { stations: true, slopes: false };
export const markShown = (mark: RouteEditMark): boolean => shown[mark];
/** [측점] · [기울기] 단추 — 누르면 켬끔 · 다시 그림. */
export function bindMarkToggle(button: HTMLButtonElement, mark: RouteEditMark): void {
const paint = (): void => {
button.classList.toggle("is-active", shown[mark]);
button.setAttribute("aria-pressed", String(shown[mark]));
};
paint();
button.addEventListener("click", () => {
shown[mark] = !shown[mark];
paint();
scheduleRedraw();
});
}