From ab0dd91afa3c6c59026ae6b4b0542e403e1a5ba7 Mon Sep 17 00:00:00 2001 From: Leopoldadmin Date: Mon, 22 Jun 2026 21:06:05 +0000 Subject: [PATCH] Add Tool base class --- frontend/src/tools/Tool.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/src/tools/Tool.ts diff --git a/frontend/src/tools/Tool.ts b/frontend/src/tools/Tool.ts new file mode 100644 index 0000000..cf2eb04 --- /dev/null +++ b/frontend/src/tools/Tool.ts @@ -0,0 +1,16 @@ +import { YjsDocument } from '../crdt/YjsDocument'; +xport abstract class Tool { + protected yjsDoc: YjsDocument; + protected name: string; + + constructor(yjsDoc: YjsDocument) { + this.yjsDoc = yjsDoc; + this.name = ''; + } + + abstract onMouseDown(event: MouseEvent): void; + abstract onMouseMove(event: MouseEvent): void; + abstract onMouseUp(event: MouseEvent): void; + abstract onKeyUp(event: KeyboardEvent): void; + abstract reset(): void; +} \ No newline at end of file