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