fix: stale appState.pendingImageElement (#5322)

* fix: stale `appState.pendingImageElement`

* unrelated fix for devTools race conditions

* snap fix
This commit is contained in:
David Luzar 2022-06-19 14:13:43 +02:00 committed by GitHub
parent fd48c2cf79
commit 4712393b62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 107 additions and 103 deletions

View file

@ -176,7 +176,7 @@ export type AppState = {
data: Spreadsheet;
};
/** imageElement waiting to be placed on canvas */
pendingImageElement: NonDeleted<ExcalidrawImageElement> | null;
pendingImageElementId: ExcalidrawImageElement["id"] | null;
showHyperlinkPopup: false | "info" | "editor";
};
@ -378,6 +378,7 @@ export type AppClassProperties = {
>;
files: BinaryFiles;
deviceType: App["deviceType"];
scene: App["scene"];
};
export type PointerDownState = Readonly<{