Files
Aislo/B05_Profile/B05_Profile_UI_Panel_Sections.ts
T
eomsangdonandClaude Sonnet 5.5 2c520537b6 refactor(B05·B06): 좌측 칸을 등록부로 · 아래 단추 넷 · B05 Panel 나눔(24-2b)
- B05 좌측 패널(714줄)을 Fields · Settings · Route · View · Sections 로 나누고 createRoutePanel 은 등록부로 세움
- B06 좌측 칸(횡단 보기 설정 · 표준 횡단면 설정)을 등록부로 · 페이지는 createDesignPanel 만 부름
- 「구조물 배치」는 design_sections 한 정의로 두 보기
- 아래 단추 [초기화][저장][확정][보기 전환] — B05 [확정]은 저장 흐름 이음 전까지 꺼 둠
- [초기화] 는 design_reset 한 함수를 두 보기가 부름
- 칸 DOM 은 고치기 전과 같음(전후 DOM 대조)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EauA2ATmqNRbeV48s9CcBr
2026-09-29 20:17:35 +09:00

70 lines
2.6 KiB
TypeScript

/* =============================================================================
* B05_Profile_UI_Panel_Sections.ts
* 종단 보기 좌측 패널의 **칸 정의**(등록부 `registerPanelSection`) — 페이지 설정 · 계획노선 ·
* 경로 계산 설정 · 선택 포인트 상세. 「구조물 배치」는 두 보기 공용이라 `design_sections.ts` 에 있다.
*
* 칸 차례(2026-08-18 사용자 확정): 구조물 배치 > 페이지 설정 > 계획노선 > 경로 계산 설정(비활성)
* > 선택 포인트(평소 숨김) > 아래 고정 영역. 재료는 `_Panel_Settings` · `_Panel_Route` 가 만들어
* `ctx.parts` 로 건넨다.
* ========================================================================== */
import "../A00_Common/design/design_sections";
import { createSectionFrame, part, registerPanelSection } from "../A00_Common/design/design_panel";
import type { RoutePart } from "./B05_Profile_UI_Panel_Route";
import type { SettingsPart } from "./B05_Profile_UI_Panel_Settings";
registerPanelSection({
id: "page-settings",
title: "페이지 설정",
views: ["profile"],
order: 20,
build: (ctx, view) => {
const frame = createSectionFrame(view, "페이지 설정", true);
frame.body.append(...part<SettingsPart>(ctx, "settings").nodes);
return frame.root;
},
});
registerPanelSection({
id: "planned-route",
title: "계획노선",
views: ["profile"],
order: 30,
build: (ctx, view) => {
const frame = createSectionFrame(view, "계획노선");
frame.body.append(part<RoutePart>(ctx, "route").plannedRouteButton);
return frame.root;
},
});
registerPanelSection({
id: "route-calc",
title: "경로 계산 설정",
views: ["profile"],
order: 40,
build: (ctx, view) => {
const frame = createSectionFrame(view, "경로 계산 설정", true);
frame.body.append(...part<RoutePart>(ctx, "route").calcNodes);
// 경로 계산 설정 — 사용여부 미결정으로 조작 불가(숨기지 않는다, 2026-08-18 사용자
// 지시). inert가 본문 전체 입력·드래그를 막고, is-disabled가 흐림을 그린다.
// 제목 클릭(접기/펼치기)은 본문 밖이라 그대로 산다.
frame.root.classList.add("is-disabled");
frame.body.inert = true;
return frame.root;
},
});
registerPanelSection({
id: "selected-point",
title: "선택 포인트 상세 설정",
views: ["profile"],
order: 50,
build: (ctx, view) => {
const frame = createSectionFrame(view, "선택 포인트 상세 설정");
const route = part<RoutePart>(ctx, "route");
frame.body.append(...route.selectedNodes);
route.bindSelectedRoot(frame.root);
return frame.root;
},
});