fix api and support individual shapes and text element
This commit is contained in:
+2
-2
@@ -122,8 +122,8 @@ const restoreElementWithProperties = <
|
||||
y: extra.y ?? element.y ?? 0,
|
||||
strokeColor: element.strokeColor || oc.black,
|
||||
backgroundColor: element.backgroundColor || "transparent",
|
||||
width: element.width || 100,
|
||||
height: element.height || 100,
|
||||
width: element.width,
|
||||
height: element.height,
|
||||
seed: element.seed ?? 1,
|
||||
groupIds: element.groupIds ?? [],
|
||||
roundness: element.roundness
|
||||
|
||||
+8
-12
@@ -38,21 +38,17 @@ export interface ImportedDataState {
|
||||
elements?:
|
||||
| readonly (
|
||||
| (ExcalidrawElement & {
|
||||
label?: [
|
||||
{ text: string } & MarkOptional<
|
||||
ElementConstructorOpts,
|
||||
"x" | "y"
|
||||
>,
|
||||
];
|
||||
label?: { text: string } & MarkOptional<
|
||||
ElementConstructorOpts,
|
||||
"x" | "y"
|
||||
>;
|
||||
})
|
||||
| {
|
||||
type: Exclude<ExcalidrawGenericElement["type"], "selection">;
|
||||
label?: [
|
||||
{ text: string } & MarkOptional<
|
||||
ElementConstructorOpts,
|
||||
"x" | "y"
|
||||
>,
|
||||
] &
|
||||
label?: { text: string } & MarkOptional<
|
||||
ElementConstructorOpts,
|
||||
"x" | "y"
|
||||
> &
|
||||
MarkOptional<ElementConstructorOpts, "x" | "y">;
|
||||
}
|
||||
)[]
|
||||
|
||||
Reference in New Issue
Block a user