diff --git a/A00_Common/design/design_view_cross.ts b/A00_Common/design/design_view_cross.ts index 7147f89a0..d84a5f93b 100644 --- a/A00_Common/design/design_view_cross.ts +++ b/A00_Common/design/design_view_cross.ts @@ -399,7 +399,7 @@ export async function mountCrossView( // 알약이 꺼지므로 연 것으로 다시 세움(관 알약 id = pipe-측점 · 53-1) const pipeAt = structuresPanel.currentChainage(); const mark = opened.structureId ?? (pipeAt === null ? null : `pipe-${pipeAt.toFixed(2)}`); - if (mark) sectionView.selectMark(mark); + if (mark) sectionView.selectMark(mark, false); // 측점 고름 = 카드 하나(137-4) · 목록 길은 뒤에 여럿 structureSelection.syncInletStructure(); // 카드만 고른 경우엔 구조물(벽·구체) 선택을 비운다 — 조정창이 저절로 뜨면 안 된다 // (2026-08-29 사용자). 벽을 찍어 카드가 딸려 선택된 경우는 건드리지 않는다. diff --git a/B06_Section/B06_Section_UI_Section_View.ts b/B06_Section/B06_Section_UI_Section_View.ts index 301272a01..97276c9e6 100644 --- a/B06_Section/B06_Section_UI_Section_View.ts +++ b/B06_Section/B06_Section_UI_Section_View.ts @@ -507,8 +507,9 @@ export function createSectionView( ); } }, - selectMark: (structureId) => { - spanMarkId = structureId; + selectMark: (structureId, span = true) => { + // span 끔 = 알약만 · 카드는 고른 측점 하나(137-4 — 측점 고름 리스너) + spanMarkId = span ? structureId : null; syncSpanHighlights(); profile.selectMark(structureId); }, diff --git a/B06_Section/B06_Section_UI_Section_View_Types.ts b/B06_Section/B06_Section_UI_Section_View_Types.ts index 24c05dbc1..fe0dc87f1 100644 --- a/B06_Section/B06_Section_UI_Section_View_Types.ts +++ b/B06_Section/B06_Section_UI_Section_View_Types.ts @@ -40,8 +40,9 @@ export interface SectionViewController { /** 좌측 구조물 목록에서 고른 측점 카드를 선택하고 화면에 드러낸다 — 재클릭 토글 없음 * (2026-08-29 B05/B06 일원화: 목록 클릭 → 해당 카드 스크롤·강조). null = 카드 선택 풂(54-8). */ focusStation: (stationId: string | null) => void; - /** 종단 알약 강조를 그 구조물로(null = 풀기 — 카드 측점선 짝을 따름). */ - selectMark: (structureId: string | null) => void; + /** 종단 알약 강조를 그 구조물로(null = 풀기 — 카드 측점선 짝을 따름). + * `span` = 구간형 범위 안 카드 전부 테두리(기본) · 끄면 카드는 고른 측점 하나(137-4). */ + selectMark: (structureId: string | null, span?: boolean) => void; /** 카드(측점) 선택이 바뀔 때 알림 — 좌측 「구조물 배치」 폼이 그 측점 구조물을 * 올린다(2026-08-29 일원화). null = 선택 해제. */ setStationSelectListener: (listener: (stationId: string | null) => void) => void; diff --git a/resources/tester/test_106_span_highlight_wording.py b/resources/tester/test_106_span_highlight_wording.py index eef9f9cea..3e9ca6238 100644 --- a/resources/tester/test_106_span_highlight_wording.py +++ b/resources/tester/test_106_span_highlight_wording.py @@ -23,11 +23,23 @@ VIEW = _read("B06_Section", "B06_Section_UI_Section_View.ts") def test_범위_강조_클래스는_고름_목록갱신_카드재생성_세_길에서_칠한다(): assert VIEW.count("b06-cross-card--span") == 2 # syncSpanHighlights · buildCrossCard - assert re.search(r"selectMark: \(structureId\) => \{\s+spanMarkId = structureId;", VIEW) + assert re.search( + r"selectMark: \(structureId, span = true\) => \{\s+(//[^\n]*\s+)?spanMarkId = span \? structureId : null;", + VIEW, + ) assert re.search(r"spanMarks = structures;\s+syncSpanHighlights\(\);", VIEW) assert 'card.classList.toggle("b06-cross-card--span", inSpan(section))' in VIEW +def test_측점_고름은_카드_하나_목록_고름은_여럿(): + """137-4 — 측점 고름 리스너는 span 끔 · 목록(노면공) 길 · 알약은 기본(여럿) 그대로.""" + cross = _read("A00_Common", "design", "design_view_cross.ts") + assert "if (mark) sectionView.selectMark(mark, false);" in cross + assert "markStructure: (structureId) => sectionView.selectMark(structureId)," in cross + types = _read("B06_Section", "B06_Section_UI_Section_View_Types.ts") + assert "selectMark: (structureId: string | null, span?: boolean) => void;" in types + + def test_범위_판정은_시작_종료가_다른_구간형만(): assert "start == null || end == null || start === end" in VIEW