fix single text element, unique id and tests

This commit is contained in:
Aakansha Doshi 2023-05-25 14:12:01 +05:30
parent 6c41e507db
commit 1c291f8b3d
4 changed files with 60 additions and 23 deletions

View file

@ -18,7 +18,6 @@ import type { cleanAppStateForExport } from "../appState";
import { VERSIONS } from "../constants";
import { MarkOptional } from "../utility-types";
import { ElementConstructorOpts } from "../element/newElement";
import { ELEMENTS_SUPPORTING_PROGRAMMATIC_API } from "./transform";
export interface ExportedDataState {
type: string;
@ -62,7 +61,7 @@ export interface ImportedDataState {
type: "text";
text: string;
id?: ExcalidrawTextElement["id"];
} & ElementConstructorOpts)
} & Partial<ExcalidrawTextElement>)
| ({
type: ExcalidrawLinearElement["type"];
x: number;