This commit is contained in:
Aakansha Doshi 2023-05-29 14:08:55 +05:30
parent 016662a7f6
commit f57e72443d
2 changed files with 13 additions and 1 deletions

View file

@ -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,