- 겹 표(map_layer_list) = 그룹1 22 줄 표 차례 · title = 호버제목 · group(수계망도 · 도로 · 토지·건물 · 제한·재해) · pages · 숨김 표 걷음 · 도로300m 한 줄(「도로」 묶음 · 기능 남김) - 겹 줄(map_layer_bar) = 단독 넷 | 묶음 넷(여럿 고르기 메뉴 · 켠 수 배지 · 안 닫힘) | 그래픽 카드 · sync 가 단추 · 메뉴 줄 막힘 · 글을 맞춤(why = 페이지 까닭) - 도구 표(map_toolbar) = 그룹2 17 줄 title · mapToolGroups 가 글을 표로 맞춤 · 기본 단추 생성 · 지형 칩 막힘 「수치지형도/라이다 — 까닭」 - 띠 = 한 자료 · 겹 둘(GL fillEdge 거름 · 옛 캔버스 · 범례 줄 따로) · B05 띠 받기(D03 과 같은 서버 길 · bandCollection 공용) - D03 = 겹 줄 · 도구줄 한 행(createMapToolRow) · 222px 기댐 · 줄바꿈 CSS 걷음 · 측점 · 기울기 호버 덮어쓰기 걷음 · LAS 올리기 호버 걷음 - B05 = 세로 두 줄 → 한 행 · 호버 덮어쓰기 걷음(도구줄 · 1m 등고선 · 3D · 추천) · 겹 막힘 querySelector 덮어쓰기 → 공용 sync · 임도(업로드) 보임 + 「받은 임도 자료 없음」 막힘 · 스냅 간격 날 select → 고르기 메뉴(하나) - 켬끔 기억 열쇠 · 측점 · 기울기 처음 값 · 그래픽 카드 취향 열쇠 둘 그대로 - 낡은 시험 고침(568_1 · 622_2 · 624_2 · 624_3 · 553_4 · 625_draw · b05_routeedit_initial · 626_3 · 390_4 · 346_2 · 353_1 · 581_2 · 584_1 · 584_3) — 표 꼴 row() · 호버 글 = 표 · 한 행 · 고르기 메뉴로 바뀐 글을 잡음 · 새 지킴 634_2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.7 KiB
Python
58 lines
2.7 KiB
Python
"""PLAN 624-3 — B05 평면도에 공용 지도 부품(도구줄 표 · 겹 줄 · 범례 · 지형 칩)(요구 530 · 결정 A② · A③ · A⑦ · A⑨).
|
|
|
|
- 도구줄 = 공용 표 「b05」 · 아래 줄 = 공용 겹 줄 · 범례 = 공용 `legendRows`.
|
|
- 노선 띠 300 m 자르기 = B05 자기 칸(등고선 · 하천)만 · 그 밖 겹 = 안 자르는 둘째 GL 칸.
|
|
- B05 화면 파일은 D03 파일을 안 부름 · 큰 파일은 안 늘어남.
|
|
"""
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
B05 = ROOT / "B05_Profile"
|
|
read = lambda path: path.read_text(encoding="utf-8") # noqa: E731
|
|
|
|
|
|
def test_도구줄_표_겹_줄_범례() -> None:
|
|
chrome = read(B05 / "B05_Profile_UI_RouteEdit_Chrome.ts")
|
|
assert 'mapToolGroups("b05", {' in chrome
|
|
# 634-3 — 한 행 두 영역(왼쪽 겹 줄 · 오른쪽 도구줄)
|
|
assert "createMapToolRow(layers.bar, mapTools.root)" in chrome
|
|
assert "info.prepend(layers.legend)" in chrome
|
|
layers = read(B05 / "B05_Profile_UI_RouteEdit_Layers.ts")
|
|
assert 'page: "b05"' in layers and "legendRows(" in layers and "mapLayerSpecs(" in layers
|
|
|
|
|
|
def test_띠_자르기는_등고선_하천만() -> None:
|
|
gl = read(B05 / "B05_Profile_UI_RouteEdit_Gl.ts")
|
|
assert "container.style.clipPath" in gl # B05 자기 칸(등고선 · 하천 · 1 m)
|
|
assert 'gl.setVisible("contour", own.contour)' in gl
|
|
assert 'gl.setVisible("sheets", own.stream)' in gl
|
|
assert "layers.follow(meta, normalizer, toScreen" in gl
|
|
layers = read(B05 / "B05_Profile_UI_RouteEdit_Layers.ts")
|
|
assert "clipPath" not in layers # 공용 겹 칸은 안 자름
|
|
assert 'const OWN: readonly MapLayerKey[] = ["contour", "stream"]' in layers
|
|
|
|
|
|
def test_처음_겹_숨긴_겹() -> None:
|
|
src = read(ROOT / "A00_Common" / "map" / "map_layer_list.ts")
|
|
b05 = re.search(r"b05: \{(.*?)\},", src, re.S).group(1)
|
|
# 634-2 — 숨김 걷음(띠 · 임도(업로드) 보임 · 임도(업로드) = 받은 자료 없으면 막힘 + 까닭)
|
|
assert "hide" not in b05 and 'on: ["contour", "stream"]' in b05
|
|
|
|
|
|
def test_D03_안_부름_파일_한도() -> None:
|
|
for name in (
|
|
"B05_Profile_UI_RouteEdit_Layers.ts",
|
|
"B05_Profile_UI_RouteEdit_Gl.ts",
|
|
"B05_Profile_UI_RouteEdit_Chrome.ts",
|
|
"B05_Profile_UI_RouteEdit_RecPreview.ts",
|
|
"B05_Profile_UI_RouteEdit_Terrain.ts",
|
|
):
|
|
src = read(B05 / name)
|
|
assert "D03_PlanAnalysis" not in src, name
|
|
assert len(src.splitlines()) <= 700, name
|
|
assert len(read(B05 / "B05_Profile_UI_RouteEdit.ts").splitlines()) <= 694
|
|
d03 = read(ROOT / "D03_PlanAnalysis" / "D03_PlanAnalysis_Api.ts")
|
|
assert 'export * from "../A00_Common/map/map_layer_api";' in d03
|