From 86a3266e0e5f6473406e87fef82c9c0b1ccb2287 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 29 Aug 2026 19:05:09 +0900 Subject: [PATCH] auto: 2026-08-29 19:05 (EOMSANGDON-HOME) --- .../B07_DesignDetail_Engine_Cad_Table.py | 4 +- B07_DesignDetail/B07_DesignDetail_UI_Page.ts | 74 ++++++++++++++----- .../B07_DesignDetail_UI_Style.css | 6 ++ 3 files changed, 63 insertions(+), 21 deletions(-) diff --git a/B07_DesignDetail/B07_DesignDetail_Engine_Cad_Table.py b/B07_DesignDetail/B07_DesignDetail_Engine_Cad_Table.py index 1fd56f87..a401c0cd 100644 --- a/B07_DesignDetail/B07_DesignDetail_Engine_Cad_Table.py +++ b/B07_DesignDetail/B07_DesignDetail_Engine_Cad_Table.py @@ -113,8 +113,8 @@ def _cross_table_entities( width = _CROSS_TABLE_WIDTH row_h = _CROSS_TABLE_ROW_HEIGHT font = _CROSS_TABLE_FONT - left = -width / 2.0 - right = width / 2.0 + left = center_x - width / 2.0 + right = center_x + width / 2.0 edges = _cross_column_edges(width, center_x) entities: list[dict[str, Any]] = [] diff --git a/B07_DesignDetail/B07_DesignDetail_UI_Page.ts b/B07_DesignDetail/B07_DesignDetail_UI_Page.ts index 15744630..2fec3c60 100644 --- a/B07_DesignDetail/B07_DesignDetail_UI_Page.ts +++ b/B07_DesignDetail/B07_DesignDetail_UI_Page.ts @@ -74,6 +74,22 @@ const CAD_SAVE_REQUEST_MESSAGE = "aislo:b08:save-request"; const CAD_SAVE_RESPONSE_MESSAGE = "aislo:b08:save-response"; const CAD_NAVIGATE_MESSAGE = "aislo:b08:navigate"; +/** 도면 구성 12분류 (2026-08-29 사용자 확정 순서). kind가 없으면 아직 만들지 않는 도면. */ +const DRAWING_GROUPS: readonly { label: string; kind?: DesignDrawingItem["kind"] }[] = [ + { label: "표지" }, + { label: "계획평면도(지형)" }, + { label: "계획평면도(노선배치도)" }, + { label: "계획평면도(배치도)" }, + { label: "계획평면도(라이다)" }, + { label: "종단면도", kind: "longitudinal" }, + { label: "표준 횡단면도" }, + { label: "횡단면도", kind: "cross" }, + { label: "토적도(유토곡선)" }, + { label: "유역도(배수 유역도)" }, + { label: "표준도" }, + { label: "용지도" }, +]; + /** B06 확정 산출물 기반 도면 목록 패널. */ function buildDrawingSidePanel( drawings: DesignDrawingItem[], @@ -99,33 +115,53 @@ function buildDrawingSidePanel( return panel; } - const groups: [string, DesignDrawingItem["kind"], DesignDrawingItem[]][] = [ - ["종단도", "longitudinal", drawings.filter((item) => item.kind === "longitudinal")], - ["횡단도", "cross", drawings.filter((item) => item.kind === "cross")], - ]; - for (const [label, kind, items] of groups) { - if (!items.length) continue; + const drawingButton = (drawing: DesignDrawingItem, label: string): HTMLButtonElement => { + const button = document.createElement("button"); + button.type = "button"; + button.className = "b07-drawing-button"; + button.dataset.drawingId = drawing.id; + button.dataset.confirmed = String(drawing.confirmed); + const name = document.createElement("span"); + name.className = "b07-drawing-button__name"; + name.textContent = label; + button.append(name); + button.addEventListener("click", () => onSelect(drawing)); + return button; + }; + + for (const group of DRAWING_GROUPS) { + const items = group.kind ? drawings.filter((item) => item.kind === group.kind) : []; + // 한 장짜리(와 아직 없는 도면)는 컨테이너 없이 버튼 하나로 둔다. + if (items.length <= 1) { + const [drawing] = items; + const button = drawing + ? drawingButton(drawing, group.label) + : document.createElement("button"); + if (!drawing) { + button.type = "button"; + button.className = "b07-drawing-button"; + button.disabled = true; + button.title = "준비 중"; + const name = document.createElement("span"); + name.className = "b07-drawing-button__name"; + name.textContent = group.label; + button.append(name); + } + button.dataset.pending = String(!drawing); + panel.append(button); + continue; + } const section = document.createElement("section"); // ui-sidebar-section: 사이드 컨테이너 공통 외곽선(B04~B06과 통일, 2026-08-06 사용자 지시). section.className = "b07-drawing-group ui-collapsible ui-sidebar-section"; - section.dataset.kind = kind; + if (group.kind) section.dataset.kind = group.kind; const sectionTitle = document.createElement("h3"); sectionTitle.className = "ui-collapsible__title"; - sectionTitle.textContent = `${label} ${items.length}`; + sectionTitle.textContent = `${group.label} ${items.length}`; section.append(sectionTitle); for (const drawing of items) { - const button = document.createElement("button"); - button.type = "button"; - button.className = "b07-drawing-button"; - button.dataset.drawingId = drawing.id; - button.dataset.confirmed = String(drawing.confirmed); - const name = document.createElement("span"); - name.className = "b07-drawing-button__name"; // 횡단면도는 장 단위(여러 측점)라 서버가 준 "N장 (구간)" 라벨을 그대로 쓴다. - name.textContent = drawing.label; - button.append(name); - button.addEventListener("click", () => onSelect(drawing)); - section.append(button); + section.append(drawingButton(drawing, drawing.label)); } panel.append(section); } diff --git a/B07_DesignDetail/B07_DesignDetail_UI_Style.css b/B07_DesignDetail/B07_DesignDetail_UI_Style.css index a5d673a3..296e0bf3 100644 --- a/B07_DesignDetail/B07_DesignDetail_UI_Style.css +++ b/B07_DesignDetail/B07_DesignDetail_UI_Style.css @@ -63,6 +63,12 @@ font-weight: 600; } +/* 아직 만들지 않는 도면 — 자리만 잡아 둔 버튼. */ +.b07-drawing-button[data-pending="true"] { + opacity: 0.5; + cursor: not-allowed; +} + /* 그리드 제목은 두 열을 가로지른다 */ .b07-drawing-group[data-kind="cross"] h3 { grid-column: 1 / -1;