Merge remote-tracking branches 'origin/sub_laptop_2' and 'origin/sub_laptop_8' into sub_laptop_4

This commit is contained in:
2026-09-28 12:45:10 +09:00
4 changed files with 178 additions and 2 deletions
+22 -2
View File
@@ -75,7 +75,9 @@ const grid: GridHandle = {
destroy() {},
};
function applyAndRefresh(command: import("../../../A00_Common/spreadsheet/spreadsheet_types").Command): void {
function applyAndRefresh(
command: import("../../../A00_Common/spreadsheet/spreadsheet_types").Command,
): void {
const effect = applyCommand(book, command);
if (effect.rebuild) engine.rebuild(book);
else engine.update(effect.cells);
@@ -126,7 +128,7 @@ const ctx: SpreadsheetContext = {
},
grid,
editor: {
editing: () => false,
editing: () => editingFlag,
begin() {},
commit() {},
cancel() {},
@@ -134,6 +136,24 @@ const ctx: SpreadsheetContext = {
},
};
// 단위 기호 [편집 중이면 커서 자리에] 갈래 시험용 — 진짜 D 편집기 대신 숨은 textarea 하나로 흉내.
let editingFlag = false;
const fakeEditorTa = document.createElement("textarea");
fakeEditorTa.id = "fake-editor-ta";
root.append(fakeEditorTa);
(window as unknown as { __setEditing: (on: boolean, value?: string) => void }).__setEditing = (
on,
value,
) => {
editingFlag = on;
if (on) {
if (value !== undefined) fakeEditorTa.value = value;
fakeEditorTa.focus();
} else {
fakeEditorTa.blur();
}
};
const toolbar = mountToolbar(ctx);
const tabs = mountTabs(ctx);
attachMenu(ctx);