Initial move

This commit is contained in:
2024-09-03 14:50:33 +02:00
parent adb6be0006
commit 9fa656ed5e
138 changed files with 13117 additions and 0 deletions

26
frontend/src/ui/canvas.ts Normal file
View File

@@ -0,0 +1,26 @@
import { UINode } from "./node";
export class Canvas extends UINode {
private canvasElement: HTMLCanvasElement;
public constructor(title: string) {
super(title);
this.canvasElement = document.createElement("canvas");
this.canvasElement.setAttribute("tabindex", "-1");
this.element.appendChild(this.canvasElement);
}
public focus() {
this.canvasElement.focus();
return this;
}
public click() {
this.canvasElement.click();
return this;
}
public getElement(): HTMLElement {
return this.canvasElement;
}
}