mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix
This commit is contained in:
parent
016662a7f6
commit
f57e72443d
2 changed files with 13 additions and 1 deletions
|
@ -102,7 +102,6 @@ export const restoreElementWithProperties = <
|
|||
> &
|
||||
Partial<Pick<ExcalidrawElement, "type" | "x" | "y">>,
|
||||
): T => {
|
||||
console.log("ELEMENT", element.backgroundColor);
|
||||
const base: Pick<T, keyof ExcalidrawElement> & {
|
||||
[PRECEDING_ELEMENT_KEY]?: string;
|
||||
} = {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue