From fe9f89a0fcc5d238097eee69e8e45e85225220c0 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Tue, 29 Aug 2023 12:49:49 +0530 Subject: [PATCH] compute width, height correctly for arrows --- src/data/transform.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/data/transform.ts b/src/data/transform.ts index 1a2962875..4c14314dc 100644 --- a/src/data/transform.ts +++ b/src/data/transform.ts @@ -39,6 +39,7 @@ import { } from "../element/types"; import { MarkOptional } from "../utility-types"; import { assertNever, getFontString } from "../utils"; +import { getSizeFromPoints } from "../points"; export type ValidLinearElement = { type: "arrow" | "line"; @@ -444,6 +445,11 @@ export const convertToExcalidrawElements = ( ], ...element, }); + + Object.assign( + excalidrawElement, + getSizeFromPoints(excalidrawElement.points), + ); break; } case "text": {