mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: change boundElementIds
→ boundElements
(#4404)
This commit is contained in:
parent
104664cb9e
commit
390da3fd0f
13 changed files with 589 additions and 555 deletions
|
@ -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(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue