mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
preserve bindings if present and fix testcases
This commit is contained in:
parent
75cfe54b15
commit
f113a393e6
4 changed files with 23 additions and 10 deletions
|
@ -154,7 +154,6 @@ export const restoreElementWithProperties = <
|
|||
if (PRECEDING_ELEMENT_KEY in element) {
|
||||
base[PRECEDING_ELEMENT_KEY] = element[PRECEDING_ELEMENT_KEY];
|
||||
}
|
||||
|
||||
return {
|
||||
...base,
|
||||
...getNormalizedDimensions(base),
|
||||
|
@ -237,7 +236,6 @@ const restoreElement = (
|
|||
startArrowhead = null,
|
||||
endArrowhead = element.type === "arrow" ? "arrow" : null,
|
||||
} = element;
|
||||
|
||||
let x = element.x;
|
||||
let y = element.y;
|
||||
let points = // migrate old arrow model to new one
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
Arrowhead,
|
||||
ExcalidrawBindableElement,
|
||||
ExcalidrawElement,
|
||||
FontFamilyValues,
|
||||
|
@ -89,6 +90,7 @@ export interface ImportedDataState {
|
|||
end?: {
|
||||
type: ExcalidrawBindableElement["type"];
|
||||
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
|
||||
endArrowhead?: Arrowhead | null;
|
||||
} & ElementConstructorOpts)
|
||||
)[]
|
||||
| null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue