feat(spreadsheet): C 격자 — 행·열 묶어 접기(윤곽 +/- 단추, 계약 더함)
RowInfo·ColumnInfo.묶음{층,접힘} · Command「묶음설정」더함(계약 더함) — 접힘 상태 저장 ·
접으면 숨김처럼 그리되 머리 이중선 표시는 숨김·걸러짐과 갈라 안 보임(따로 표시).
commands.ts 는 기존 setAxis 틀에 「묶음」prop·case 만 최소로 얹음(exhaustive switch 깨짐 막음).
ORCA 시험 틀에서 접기·펴기 dispatch·저장·머리 이동·표시 구분 수치로 확인.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVM3xZ1aUPcUTuW2WZSnwg
This commit is contained in:
@@ -39,8 +39,18 @@ const sheet: Sheet = {
|
||||
},
|
||||
comments: { H4: "메모 — ROUNDDOWN 끝수 확인" },
|
||||
병합: ["A1:H1", "B8:C9"],
|
||||
열: { A: { 폭: 14 }, D: { 숨김: true } },
|
||||
행: { "1": { 높이: 22 }, "5": { 숨김: true } },
|
||||
열: {
|
||||
A: { 폭: 14 },
|
||||
D: { 숨김: true },
|
||||
E: { 묶음: { 층: 1 } },
|
||||
F: { 묶음: { 층: 1 } },
|
||||
},
|
||||
행: {
|
||||
"1": { 높이: 22 },
|
||||
"5": { 숨김: true },
|
||||
"11": { 묶음: { 층: 1 } },
|
||||
"12": { 묶음: { 층: 1 } },
|
||||
},
|
||||
틀고정: { 행: 3, 열: 1 },
|
||||
보기: { 눈금선: true },
|
||||
};
|
||||
@@ -129,6 +139,14 @@ const ctx: SpreadsheetContext = {
|
||||
...sheet.행,
|
||||
[String(r0 + 1)]: { ...sheet.행?.[String(r0 + 1)], 높이: command.높이 ?? undefined },
|
||||
};
|
||||
} else if (command.종류 === "묶음설정") {
|
||||
const table = command.축 === "열" ? "열" : "행";
|
||||
const next = { ...sheet[table] } as Record<string, { 묶음?: unknown }>;
|
||||
for (const i of command.번호) {
|
||||
const key = command.축 === "열" ? String.fromCharCode(65 + i) : String(i + 1);
|
||||
next[key] = { ...next[key], 묶음: command.묶음 ?? undefined };
|
||||
}
|
||||
(sheet as unknown as Record<string, unknown>)[table] = next;
|
||||
}
|
||||
grid.render();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user