소스 검색

fix: restore linear dimensions from points (#8062)

David Luzar 1 년 전
부모
커밋
4eb9463f26
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      packages/excalidraw/data/restore.ts

+ 2 - 0
packages/excalidraw/data/restore.ts

@@ -45,6 +45,7 @@ import {
 } from "../element/textElement";
 import { normalizeLink } from "./url";
 import { syncInvalidIndices } from "../fractionalIndex";
+import { getSizeFromPoints } from "../points";
 
 type RestoredAppState = Omit<
   AppState,
@@ -270,6 +271,7 @@ const restoreElement = (
         points,
         x,
         y,
+        ...getSizeFromPoints(points),
       });
     }