feat: change boundElementIds
→ boundElements
(#4404)
This commit is contained in:
@ -64,7 +64,10 @@ const restoreElementWithProperties = <
|
||||
T extends ExcalidrawElement,
|
||||
K extends Pick<T, keyof Omit<Required<T>, keyof ExcalidrawElement>>,
|
||||
>(
|
||||
element: Required<T>,
|
||||
element: Required<T> & {
|
||||
/** @deprecated */
|
||||
boundElementIds?: readonly ExcalidrawElement["id"][];
|
||||
},
|
||||
extra: Pick<
|
||||
T,
|
||||
// This extra Pick<T, keyof K> ensure no excess properties are passed.
|
||||
@ -98,7 +101,9 @@ const restoreElementWithProperties = <
|
||||
strokeSharpness:
|
||||
element.strokeSharpness ??
|
||||
(isLinearElementType(element.type) ? "round" : "sharp"),
|
||||
boundElementIds: element.boundElementIds ?? [],
|
||||
boundElements: element.boundElementIds
|
||||
? element.boundElementIds.map((id) => ({ type: "arrow", id }))
|
||||
: element.boundElements ?? [],
|
||||
updated: element.updated ?? getUpdatedTimestamp(),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user