绘制形状

This commit is contained in:
lzp
2026-03-17 17:17:48 +08:00
parent de5a35060b
commit f12d6aec96
19 changed files with 606 additions and 37 deletions

View File

@@ -9,13 +9,14 @@ export class KeyEventManager {
/** 处理键盘事件 */
_handleKeyDown: any
handleKeyDown(event: any) {
const activeID = this.stateManager.layerManager.activeID.value
const ctrl = event.ctrlKey ? 'ctrl-' : "";
const shift = event.shiftKey ? 'shift-' : "";
const key = event.key;
const reg = new RegExp(`^${ctrl}${shift}${key}$`, 'i')
const list = [
// { key: "ctrl-c", handler: () => this.handleCopy(event) },
// { key: "delete", handler: () => this.handleDelete(event) },
{ key: "ctrl-c", handler: () => this.stateManager.layerManager.copyLayerById(activeID) },
{ key: "delete", handler: () => this.stateManager.layerManager.deleteLayerById(activeID) },
{ key: "ctrl-z", handler: () => this.stateManager.undoState() },
{ key: "ctrl-shift-z", handler: () => this.stateManager.redoState() },
]