mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-23 01:10:10 +02:00
fix
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user