mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support adding multiple library items on canvas (#5116)
This commit is contained in:
parent
cad6097d60
commit
d2cc76e52e
11 changed files with 275 additions and 34 deletions
|
@ -59,9 +59,10 @@ export class API {
|
|||
};
|
||||
|
||||
static createElement = <
|
||||
T extends Exclude<ExcalidrawElement["type"], "selection">,
|
||||
T extends Exclude<ExcalidrawElement["type"], "selection"> = "rectangle",
|
||||
>({
|
||||
type,
|
||||
// @ts-ignore
|
||||
type = "rectangle",
|
||||
id,
|
||||
x = 0,
|
||||
y = x,
|
||||
|
@ -71,7 +72,7 @@ export class API {
|
|||
groupIds = [],
|
||||
...rest
|
||||
}: {
|
||||
type: T;
|
||||
type?: T;
|
||||
x?: number;
|
||||
y?: number;
|
||||
height?: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue