diff --git a/src/data/restore.ts b/src/data/restore.ts index ad909b7ece..d9662a888c 100644 --- a/src/data/restore.ts +++ b/src/data/restore.ts @@ -102,7 +102,6 @@ export const restoreElementWithProperties = < > & Partial>, ): T => { - console.log("ELEMENT", element.backgroundColor); const base: Pick & { [PRECEDING_ELEMENT_KEY]?: string; } = { diff --git a/src/data/transform.ts b/src/data/transform.ts index 24fccf6d4c..55de7974e4 100644 --- a/src/data/transform.ts +++ b/src/data/transform.ts @@ -333,6 +333,19 @@ export const convertToExcalidrawElements = ( if (endBoundElement && !elementWithid?.end?.id) { excalidrawElements.push(endBoundElement); } + } else if (elementWithid.type === "line") { + const width = elementWithid.width || 300; + const height = elementWithid.height || 0; + const lineElement = newLinearElement({ + width, + height, + points: [ + [0, 0], + [width, height], + ], + ...elementWithid, + }); + excalidrawElements.push(lineElement); } else { excalidrawElement = { ...elementWithid,