frontend whiteboard canvas with rectangle support

This commit is contained in:
2026-02-16 16:13:43 +01:00
parent c200847c17
commit 0f0418dee3
8 changed files with 417 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
export interface Position {
x: number
y: number
}
export interface Shape {
id: string
ownerId: string
position: Position
color: string
}
export interface Rectangle extends Shape {
endPosition: Position
borderThickness: number
}
export interface Arrow extends Shape {
endPosition: Position
thickness: number
}
export interface Line extends Shape {
endPosition: Position
thickness: number
}
export interface TextShape extends Shape {
textValue: string
textSize: number
}
export interface Whiteboard {
whiteboardId: string
ownerId: string
rectangles: Rectangle[]
arrows: Arrow[]
lines: Line[]
textShapes: TextShape[]
}
export type ShapeTool = 'rectangle' | 'arrow' | 'line' | 'text'