fix: keep customData when converting to ExcalidrawElement (#7656)

* feat: keep customData when converting to ExcalidrawElement (#7654)

* docs: add changelog for keeping customData when converting to ExcalidrawElement
This commit is contained in:
YuBin, Hsu 2024-02-08 19:53:10 +08:00 committed by GitHub
parent 0513b647ec
commit def1df2c68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 482 additions and 0 deletions

View file

@ -68,6 +68,7 @@ export type ElementConstructorOpts = MarkOptional<
| "roundness"
| "locked"
| "opacity"
| "customData"
>;
const _newElementBase = <T extends ExcalidrawElement>(
@ -121,6 +122,7 @@ const _newElementBase = <T extends ExcalidrawElement>(
updated: getUpdatedTimestamp(),
link,
locked,
customData: rest.customData,
};
return element;
};