refactor: factor out shape generation from renderElement.ts pt 2 (#6878)

This commit is contained in:
David Luzar 2023-08-14 13:52:25 +02:00 committed by GitHub
parent c29f19a88b
commit 9e0bfd178e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 438 additions and 416 deletions

View file

@ -1,4 +1,5 @@
import { RoughCanvas } from "roughjs/bin/canvas";
import type { RoughCanvas } from "roughjs/bin/canvas";
import { Drawable } from "roughjs/bin/core";
import {
ExcalidrawTextElement,
NonDeletedExcalidrawElement,
@ -90,3 +91,18 @@ export type ScrollBars = {
height: number;
} | null;
};
export type ElementShape = Drawable | Drawable[] | null;
export type ElementShapes = {
rectangle: Drawable;
ellipse: Drawable;
diamond: Drawable;
embeddable: Drawable;
freedraw: Drawable | null;
arrow: Drawable[];
line: Drawable[];
text: null;
image: null;
frame: null;
};