mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: factor out shape generation from renderElement.ts
pt 2 (#6878)
This commit is contained in:
parent
c29f19a88b
commit
9e0bfd178e
5 changed files with 438 additions and 416 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue