feat(B05): 367-1 유토곡선 늘 전체 맞춤 · 측점 연계 보기 지움 · 기본 = 횡단 기준 + 토량 분배 · [도형 위치 초기화] 횡단 기준 왼쪽
- 유토곡선 = 늘 노선 전체 한 화면(측점선 · 스크롤 동기 · 휠 · 스크롤마다 다시 그림 지움) - 범례 기본값에 토량 분배 더함 · masshaul-visible 판 v6 - [토량 분배] = 분배 그림 보임/숨김 · [도형 위치 초기화] 범례 맨 앞 - 시험 354_1 · 354_2 · 354_3 · 224_1b 고쳐 씀 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
This commit is contained in:
@@ -23,7 +23,7 @@ const mass = read("B05_Profile", "B05_Profile_UI_Profile_MassHaul.ts");
|
||||
let stored = null;
|
||||
const src = [
|
||||
'const SERIES_BASES = ["cross", "longitudinal"];',
|
||||
'const DEFAULT_VISIBLE = ["cross"];',
|
||||
'const DEFAULT_VISIBLE = ["cross", "balance"];', // 367-1 기본 = 횡단 + 분배
|
||||
block(util, "export function normalizeVisibleBasis("),
|
||||
block(mass, "function readVisible(): Set<string> {"),
|
||||
block(util, "export function computeMassHaulSeries("),
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
@@ -65,7 +64,5 @@ def test_끌기도_유토_판_안_셈():
|
||||
|
||||
def test_뗀_유토는_노선_전체_세로():
|
||||
mass = (B05 / "B05_Profile_UI_Profile_MassHaul.ts").read_text(encoding="utf-8")
|
||||
assert re.search(
|
||||
r'viewRange: overlay\.classList\.contains\("is-popout"\) \? undefined : params\.axis\.viewRange',
|
||||
mass,
|
||||
)
|
||||
# 367-1 붙음 · 뗌 모두 노선 전체 세로
|
||||
assert "viewRange: undefined," in mass
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
- 종단 열(`b05-route-profile__column`) = [종단 칸(bodyWrap), 유토 판] · content 안이라 종단 [창 분할]
|
||||
(`.is-popout > :not(content)` 숨김)에도 같이 감 · B05 · B06 이 같은 `design_profile` 하나.
|
||||
- 유토 판은 흐름 칸(겹침 아님) · 자기 리사이저 높이 · 접으면 머리줄만(손잡이 · [창 분할] 닿음).
|
||||
- 높이 나눔 · 표 쌓기에서 빠짐(표 bottomOffset 없음) · X 동기화는 그대로.
|
||||
- 높이 나눔 · 표 쌓기에서 빠짐(표 bottomOffset 없음) · X 동기화 없음(367-1 늘 전체 맞춤).
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -30,7 +30,7 @@ def test_종단_열_아래_자기_칸():
|
||||
assert 'column.className = "b05-route-profile__column";' in overlays
|
||||
assert "column.append(bodyWrap, massHaul.overlay);" in overlays
|
||||
assert "bodyWrap.append(massHaul.overlay" not in overlays
|
||||
assert "massHaul.attachScrollSync(body);" in overlays
|
||||
assert "massHaul.attachScrollSync" not in overlays # 367-1 측점 연계 없앰
|
||||
profile = read("A00_Common/design/design_profile.ts")
|
||||
assert "content.append(column);" in profile
|
||||
assert sum(1 for _ in profile.splitlines()) <= 700
|
||||
|
||||
@@ -37,7 +37,7 @@ def test_저장된_종단_범례는_횡단으로(r):
|
||||
assert r["longitudinal"] == ["cross"]
|
||||
assert r["longitudinalBalance"] == ["balance", "cross"]
|
||||
assert r["cross"] == ["cross"]
|
||||
assert r["empty"] == ["cross"] and r["broken"] == ["cross"]
|
||||
assert r["empty"] == ["balance", "cross"] and r["broken"] == ["balance", "cross"]
|
||||
|
||||
|
||||
def test_기준_횡단만_계산(r):
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
- 메아리: scroll 은 다음 틀에 옴 → 동기 플래그로 못 막아 한 틀 전 값을 되씀 → 뒤로 튐 →
|
||||
휠 이동이 접힘. 공용 `linkScrollLeft`(Wheel.ts)가 써 넣은 값으로 온 scroll 을 무시.
|
||||
가짜 창(다음 틀 scroll) 재현 — 옛 잇기는 뒤로 튐 · 멈춤, 새 잇기는 4 경우 × 휠 쪽 둘 모두 튐 0.
|
||||
- 유토 스크롤 그리기 = 열림 · 분배 맞춤 아님 · 붙음일 때만 · 한 틀 한 번 · 다시 셈 없음.
|
||||
- 유토곡선 = 늘 전체 맞춤 · 종단과 안 이음(367-1) — 휠 · 잇기 경우는 공용 도우미 시험으로 남김.
|
||||
|
||||
`helper_354_3_scroll_echo.cjs` 가 진짜 휠 · 잇기 TS 를 가짜 창 위에서 돌림.
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
@@ -64,24 +63,25 @@ def test_새_잇기는_뒤로_튐_0_끝까지(r, case):
|
||||
assert got["mass"] == (0 if balance else 1200)
|
||||
|
||||
|
||||
def test_유토_표_같은_도우미():
|
||||
for name in ("MassHaul", "TableOverlay"):
|
||||
src = (B05 / f"B05_Profile_UI_Profile_{name}.ts").read_text(encoding="utf-8")
|
||||
assert "linkScrollLeft(main, scroll" in src
|
||||
assert "syncing" not in src
|
||||
|
||||
|
||||
def test_유토_스크롤_그리기는_창_따를_때만_한_틀_한_번():
|
||||
def test_표만_잇기_유토는_안_이음():
|
||||
# 367-1 유토곡선 = 늘 전체 맞춤 · 종단 스크롤과 안 이음
|
||||
table = (B05 / "B05_Profile_UI_Profile_TableOverlay.ts").read_text(encoding="utf-8")
|
||||
assert "linkScrollLeft(main, scroll" in table
|
||||
assert "syncing" not in table
|
||||
mass = (B05 / "B05_Profile_UI_Profile_MassHaul.ts").read_text(encoding="utf-8")
|
||||
body = mass[mass.index("function drawWindow(") :]
|
||||
body = body[: body.index("\n }\n")]
|
||||
assert '!open || fitted || overlay.classList.contains("is-popout") || !lastSeries' in body
|
||||
assert "windowState.frame" in body and "frameOf(overlay" in body
|
||||
assert "draw(lastParams, true)" in body
|
||||
# 다시 셈 없음 · 총괄값 · 범례는 계열이 바뀔 때만
|
||||
assert re.search(r"reuse && lastSeries\s*\? lastSeries", mass)
|
||||
for gone in ("linkScrollLeft", "attachWheelHorizontalScroll", "attachScrollSync", "drawWindow"):
|
||||
assert gone not in mass, gone
|
||||
|
||||
|
||||
def test_유토는_늘_전체_맞춤_스크롤마다_안_그림():
|
||||
mass = (B05 / "B05_Profile_UI_Profile_MassHaul.ts").read_text(encoding="utf-8")
|
||||
assert "hideStations: true," in mass
|
||||
assert "viewRange: undefined," in mass
|
||||
assert "scroll.scrollLeft = 0;" in mass
|
||||
assert "createMassHaulWindowState" not in mass and "scheduleMassHaulSettle" not in mass
|
||||
assert "if (series !== lastSeries) emitSummary(series);" in mass
|
||||
# 다시 그려도 제 자리 — 종단 값으로 되쓰는 것은 처음 · 맞춤 뒤 · 창 옮김 뒤만
|
||||
assert "scroll.scrollLeft = syncedMain.scrollLeft" not in mass
|
||||
render = (B05 / "B05_Profile_UI_Profile_Render.ts").read_text(encoding="utf-8")
|
||||
assert "massHaul.drawWindow({" in render
|
||||
assert "drawWindow" not in render and "massHaulUpdater" not in render
|
||||
css = (B05 / "B05_Profile_UI_Style_MassHaul.css").read_text(encoding="utf-8")
|
||||
block = css[css.index(".b05-profile__masshaul-scroll {") :]
|
||||
assert "overflow-x: hidden;" in block[: block.index("}")]
|
||||
|
||||
Reference in New Issue
Block a user