fix(m02-cf): 입력 상자 단위를 요소 · 변수 단위에 맞춤 — 열 때 바로잡음(견본 인력 상자 원/일)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ACSGaHdLgnkEkoA4LDtMU
This commit is contained in:
2026-10-01 16:49:20 +09:00
co-authored by Claude Sonnet 5.5
parent 2be767d186
commit aacd21dd7c
3 changed files with 47 additions and 0 deletions
@@ -31,6 +31,7 @@ import {
elementOf,
machineFields,
queryOf,
reconcileUnit,
removeElement,
setKind,
valueOf,
@@ -143,6 +144,9 @@ export function renderInputPanel(
host.replaceChildren(el("p", { className: "m02-cfip__muted", text: t("NotInput") }));
return;
}
// 상자 단위가 고른 요소 · 변수 단위와 다르면(견본 등) 맞춰 다시 그림 — 맞으면 바로 지나감
const fixed = reconcileUnit(lg, boxId);
if (fixed !== lg) return on.change(fixed);
const input = box.input ?? { mode: "variable" as const, elements: [], variables: [] };
const kind: CfGroup | "변수" = input.mode === "variable" ? "변수" : (input.group ?? "인력");
const body = el("div", { className: "m02-cfip__body" });