diff --git a/B06_Section/B06_Section_UI_Adjust_Dock.ts b/B06_Section/B06_Section_UI_Adjust_Dock.ts index e194f2270..394bfae5d 100644 --- a/B06_Section/B06_Section_UI_Adjust_Dock.ts +++ b/B06_Section/B06_Section_UI_Adjust_Dock.ts @@ -101,13 +101,17 @@ function slotOf(side: "inlet" | "outlet"): HTMLElement { * 나오지 않는다(2026-08-29 사용자 보고: 단 수·옵션이 사라짐). */ const movedRows: Array<{ row: HTMLElement; anchor: Comment }> = []; -/** 그룹 이름표 — 원래 문구를 한 번만 적어 두고, 선택에 따라 괄호 표기를 붙였다 뗀다. */ +/** 그룹 이름표 — 원래 문구를 한 번만 적어 두고, 선택에 따라 괄호 표기를 붙였다 뗀다. + * 글 칸(첫 글 마디)만 고침 — 이름표에 붙은 [삭제] 단추는 그대로(294-1). */ function setGroupLabel(group: HTMLElement, suffix: string): void { const legend = group.querySelector("legend"); if (!legend || legend.dataset.fixedLabel) return; - legend.dataset.baseLabel ??= legend.textContent ?? ""; + const text = + [...legend.childNodes].find((node) => node.nodeType === Node.TEXT_NODE) ?? + legend.insertBefore(document.createTextNode(""), legend.firstChild); + legend.dataset.baseLabel ??= text.textContent ?? ""; const base = legend.dataset.baseLabel; - legend.textContent = suffix ? `${base} (${suffix})` : base; + text.textContent = suffix ? `${base} (${suffix})` : base; } /** 옮겨 온 행을 **원래 자리로 되돌리고** 슬롯을 비운다. 그룹 강조도 끈다. */