feat: change boundElementIdsboundElements (#4404)

This commit is contained in:
David Luzar 2021-12-14 16:07:01 +01:00 committed by GitHub
parent 104664cb9e
commit 390da3fd0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 589 additions and 555 deletions

View file

@ -27,7 +27,7 @@ type ElementConstructorOpts = MarkOptional<
| "height"
| "angle"
| "groupIds"
| "boundElementIds"
| "boundElements"
| "seed"
| "version"
| "versionNonce"
@ -50,7 +50,7 @@ const _newElementBase = <T extends ExcalidrawElement>(
angle = 0,
groupIds = [],
strokeSharpness,
boundElementIds = null,
boundElements = null,
...rest
}: ElementConstructorOpts & Omit<Partial<ExcalidrawGenericElement>, "type">,
) => ({
@ -74,7 +74,7 @@ const _newElementBase = <T extends ExcalidrawElement>(
version: rest.version || 1,
versionNonce: rest.versionNonce ?? 0,
isDeleted: false as false,
boundElementIds,
boundElements,
updated: getUpdatedTimestamp(),
});