Files
Aislo/A00_Common/design/design_profile_slots.ts
T
eomsangdonandClaude Opus 5.5 38aae89b2d refactor(B05·B06): 종단도 한 벌 — B05 종단 패널 본체를 design_profile(createDesignProfile)로 옮김 · B06 위 종단을 같은 종단도(가운데 아래 · 카드 위 칸 스크롤)로 바꿈
- A00_Common/design/design_profile.ts 본체 · design_profile_slots.ts 판 자리 약속 · Profile_Panel 827 → 감싸개 37줄(Guard · Drag 로 나눔)
- B06: 옛 붙박이 종단(Section_View_Draw · Chart · Panel) 걷음 · Section_View_Profile 이음(선택 · 구조물 편집 · 카드 갱신 · 최소 흙덮기 관 목록)
- 크기 · 접기 키 하나(profile-height · profile-collapsed) · 옛 section-panel-* 값 옮겨 받음
- 소스 문자열 시험 넷을 옮긴 자리로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BU9gbNE3aWFUvE61pS2WGt
2026-09-29 20:28:15 +09:00

48 lines
2.3 KiB
TypeScript

/* =============================================================================
* A00_Common/design/design_profile_slots.ts
* 종단도 한 벌의 **판 자리 약속**(계획서 24-1 · 24-2c) — `design_profile.ts` 가 다시
* 내보낸다(부르는 쪽은 `design_profile.ts` 에서 가져간다).
*
* 판 자리 둘 — 종단도는 자리만 내주고 판은 밖에서 만들어 끼운다(나중에 떼기 쉽게).
* · side 종단도 오른쪽 판(배수유역도 · sub7). `DesignSideFactory` 로 받는다.
* · overlay 종단도 위 겹침 판(유토곡선 · 표). 종단도가 직접 만든다.
* ========================================================================== */
import type {
DrainagePanel,
DrainagePanelCallbacks,
} from "../../B05_Profile/B05_Profile_UI_Drainage_Panel_Types";
/** 가운데 보기 — 종단 보기(3D + 종단도) · 횡단 보기(종단도 + 횡단 카드). */
export type DesignView = "profile" | "cross";
/**
* 오른쪽 판을 만들 때 종단도가 넘겨 주는 것 — 판이 알릴 일(관 목록 · 유역 · 관 고름 ·
* 우클릭 메뉴 항목)과 처음 보기. 판은 `onPipesChanged` 를 **반드시** 불러야 종단도가
* 최소 흙덮기를 판정한다.
*/
export interface DesignSideHost extends DrainagePanelCallbacks {
projectId: string;
view: DesignView;
}
/**
* 오른쪽 판(배수유역도). 종단도는 만든 직후 `load(projectId)` · 노선이 오면 `setRoute` ·
* 구조물이 바뀌면 `setIntervalSpans` · 되돌리기에 `pipeChainages`/`setPipeChainages` ·
* 보기가 바뀌면 `setView` 를 부른다. 뿌리(`root`)는 종단 열 오른쪽에 붙는다.
*/
export type DesignSideBoard = DrainagePanel & {
/** 보기가 바뀌었다 — 횡단 보기에서도 켜고 끈다(판이 정함). */
setView?: (view: DesignView) => void;
};
/** 오른쪽 판을 끼우는 함수 모양 — 종단도를 만들 때 한 번 부른다. */
export type DesignSideFactory = (host: DesignSideHost) => DesignSideBoard;
/** 위 겹침 판(유토곡선 · 표) — 종단 스크롤러와 가로 스크롤을 맞추는 떼었다 붙이는 판. */
export interface DesignOverlayBoard {
overlay: HTMLElement;
handle: HTMLElement;
attachScrollSync: (scroller: HTMLElement) => void;
}