calculate coords based on container viewport position (#1955)
* feat: calculate coords based on parent left and top so it renders correctly in host App * fix text * move offsets to state & fix bugs * fix text jumping * account for zoom in textWysiwyg & undo incorrect offsetting Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -42,11 +42,11 @@ export const saveAsJSON = async (
|
||||
);
|
||||
};
|
||||
|
||||
export const loadFromJSON = async () => {
|
||||
export const loadFromJSON = async (appState: AppState) => {
|
||||
const blob = await fileOpen({
|
||||
description: "Excalidraw files",
|
||||
extensions: ["json", "excalidraw"],
|
||||
mimeTypes: ["application/json"],
|
||||
});
|
||||
return loadFromBlob(blob);
|
||||
return loadFromBlob(blob, appState);
|
||||
};
|
||||
|
Reference in New Issue
Block a user