浏览代码

fix: refresh dimensions when elements loaded from shareable link and blob (#6333)

* fix: refresh dimensions when elements loaded from shareable link

* refresh text dimensions when loading from file

* remove log
Aakansha Doshi 2 年之前
父节点
当前提交
6aeb18b784
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/data/blob.ts
  2. 1 1
      src/excalidraw-app/data/index.ts

+ 1 - 1
src/data/blob.ts

@@ -157,7 +157,7 @@ export const loadSceneOrLibraryFromBlob = async (
           },
           localAppState,
           localElements,
-          { repairBindings: true },
+          { repairBindings: true, refreshDimensions: true },
         ),
       };
     } else if (isValidLibrary(data)) {

+ 1 - 1
src/excalidraw-app/data/index.ts

@@ -263,7 +263,7 @@ export const loadScene = async (
       await importFromBackend(id, privateKey),
       localDataState?.appState,
       localDataState?.elements,
-      { repairBindings: true },
+      { repairBindings: true, refreshDimensions: true },
     );
   } else {
     data = restore(localDataState || null, null, null, {