diff --git a/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts b/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts index ade890724..de5d49f87 100644 --- a/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts +++ b/M02_MasterTemplete/DataFlow/M02_DF_Panel.ts @@ -53,7 +53,7 @@ export interface FlowPanel { export const PANEL_MIN = 320; export const STRIP_WIDTH = 40; /** 좁은 패널에서 저절로 맞출 때 가장 작은 확대 */ -export const PANEL_FIT_MIN = 0.5; +export const PANEL_FIT_MIN = 0.25; const WIDTH_KEY = "m02.dfpanel.width"; const FOLD_KEY = "m02.dfpanel.folded"; @@ -87,6 +87,8 @@ const writeStore = (key: string, value: string): void => { /* ── 패널 ───────────────────────────────────────────────────────────── */ export function mountFlowPanel(host: HTMLElement, opts: FlowPanelOpts): FlowPanel { + /** 크게 보기 화면 — 열려 있을 때만 */ + let full: HTMLElement | null = null; const paper = createPaper({ logic: opts.logic, readOnly: opts.readOnly, @@ -98,7 +100,6 @@ export function mountFlowPanel(host: HTMLElement, opts: FlowPanelOpts): FlowPane const { diagram, detail, summary, note, undo } = paper.parts; let width = storedWidth(readStore(WIDTH_KEY)); let folded = readStore(FOLD_KEY) === "1"; - let full: HTMLElement | null = null; const tell = (): void => opts.onResize?.(folded ? STRIP_WIDTH : (width ?? host.clientWidth)); const sm = (label: string, onClick: () => void, variant: "ghost" | "filled" = "ghost") => @@ -241,10 +242,16 @@ export function mountFlowPanel(host: HTMLElement, opts: FlowPanelOpts): FlowPane full.remove(); full = null; tools.append(undo); - open.insertBefore(note, diagram); - open.insertBefore(diagram, detail); - open.insertBefore(detail, costBox); costBox.append(summary); + // 머리 · 실행 취소 줄 뒤에 판을 처음 차례대로 되돌려 끼움 + open.replaceChildren( + open.firstElementChild as HTMLElement, + tools, + note, + diagram, + detail, + costBox, + ); paper.refit(); };