feat(508-3a CAD 레이어 합치기 되돌리기): LAYMRG · LAYDEL 뒤 Ctrl+Z 한 번에 도형 레이어 · 레이어 목록 · 현재 층이 함께 돌아오고 Ctrl+Y 도 짝 · 되돌리기 단계에 도면층 전후 담음(state attachLayerChangeToUndo) · vitest layer-tools.test · 요구 325-1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 17:08:49 +09:00
co-authored by Claude Sonnet 5.5
parent 80020c26c5
commit 18fa773a2c
4 changed files with 152 additions and 13 deletions
@@ -1,8 +1,18 @@
import type { Layer } from '../App.types';
/** 도면층 목록 + 현재 층 — LAYMRG · LAYDEL 이 객체 변경과 함께 담는다 */
export interface LayerSnapshot {
layers: Layer[];
activeLayerId: string;
}
export interface UndoState {
variable: StateVariable;
// biome-ignore lint/suspicious/noExplicitAny: TODO list all undo state types
value: any;
/** 이 단계가 도면층도 바꿨다면 전 · 후 — 되돌리면 before · 다시 하면 after 를 복원 */
layerChange?: { before: LayerSnapshot; after: LayerSnapshot };
}
export enum StateVariable {