feat(M02): 47-6 면적산출 도면 패널 몸 — 그 열 구조물 도면 보기만(카드 미리보기와 같은 길)
- DrawingCard.mountDrawingView 보기 갈래 추가 · AreaDrawing 처음 펼 때 읽고 그림 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W4uKaV4ZBhsJN4GHG7yRj4
This commit is contained in:
@@ -56,6 +56,28 @@ function hideChrome(frame: HTMLIFrameElement, css: string): void {
|
||||
export const drawingEditable = (editable: boolean, source: ItemSource): boolean =>
|
||||
editable && !!source.write;
|
||||
|
||||
/** 보기만 도면 — 카드 미리보기의 보기 갈래와 같은 길(확대 · 이동만 · 면적산출 오른쪽 도면 패널 47-6) */
|
||||
export function mountDrawingView(
|
||||
host: HTMLElement,
|
||||
doc: StructureDoc,
|
||||
source: Pick<ItemSource, "layer" | "projectId">,
|
||||
column: string,
|
||||
): { destroy: () => void } {
|
||||
const handle = mountDrawingTemplate(host, doc.도면 as unknown as DrawingTemplateDoc, {
|
||||
readOnly: true,
|
||||
name: `preview:${column}`,
|
||||
layer: source.layer,
|
||||
projectId: source.projectId,
|
||||
panelsCollapsed: true,
|
||||
preview: true,
|
||||
originMarker: true,
|
||||
noArea: true,
|
||||
});
|
||||
const frame = host.querySelector("iframe");
|
||||
if (frame) hideChrome(frame, HIDE_VIEW);
|
||||
return { destroy: () => handle.destroy() };
|
||||
}
|
||||
|
||||
export interface DrawingCardOptions {
|
||||
/** 구조물 도면 문서 통째(`도번` · `도면` …) — 저장은 `도면` 칸만 갈아 끼움 */
|
||||
doc: StructureDoc;
|
||||
|
||||
Reference in New Issue
Block a user