mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
retain local appState props on restore (#2224)
Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
parent
b91f929503
commit
7618ca48d7
9 changed files with 153 additions and 69 deletions
|
@ -45,13 +45,13 @@ export const saveAsJSON = async (
|
|||
);
|
||||
};
|
||||
|
||||
export const loadFromJSON = async (appState: AppState) => {
|
||||
export const loadFromJSON = async (localAppState: AppState) => {
|
||||
const blob = await fileOpen({
|
||||
description: "Excalidraw files",
|
||||
extensions: [".json", ".excalidraw"],
|
||||
mimeTypes: ["application/json"],
|
||||
});
|
||||
return loadFromBlob(blob, appState);
|
||||
return loadFromBlob(blob, localAppState);
|
||||
};
|
||||
|
||||
export const isValidLibrary = (json: any) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue