fix(M02): 구조물 설계 컨테이너 미리보기에서 CAD 도구 모음 숨김
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EprXZenk62RAhh6G4v1iEF
This commit is contained in:
@@ -122,6 +122,20 @@ export function createStructurePanel(opts: StructurePanelOptions): StructurePane
|
||||
|
||||
const note = (text: string): HTMLElement => el("p", { className: "m02-struct__empty", text });
|
||||
|
||||
/** 미리보기 CAD 는 iframe — 안쪽 도구 모음(제목줄 · 리본)을 스타일로 숨김(같은 출처라 접근 가능) */
|
||||
const hideToolbar = (frame: HTMLIFrameElement): void => {
|
||||
const apply = (): void => {
|
||||
const inner = frame.contentDocument;
|
||||
if (!inner?.head || inner.getElementById("m02-struct-hide")) return;
|
||||
const style = inner.createElement("style");
|
||||
style.id = "m02-struct-hide";
|
||||
style.textContent = ".cad-titlebar, .cad-ribbon { display: none !important; }";
|
||||
inner.head.append(style);
|
||||
};
|
||||
frame.addEventListener("load", apply);
|
||||
apply();
|
||||
};
|
||||
|
||||
/** 미리보기 · 산출근거 표 — 문서가 없으면 없음 글 */
|
||||
const paintBody = (): void => {
|
||||
drop();
|
||||
@@ -141,6 +155,8 @@ export function createStructurePanel(opts: StructurePanelOptions): StructurePane
|
||||
name: `preview:${column ?? ""}`,
|
||||
layer: "system",
|
||||
});
|
||||
const frame = previewHost.querySelector("iframe");
|
||||
if (frame) hideToolbar(frame);
|
||||
basis = createSheet(basisHost, doc.산출근거 as unknown as SheetDoc, {
|
||||
mode: "master",
|
||||
onChange: () => (basisDirty = true),
|
||||
|
||||
Reference in New Issue
Block a user