fractionalIndex as a byproduct or zIndex

This commit is contained in:
Ryan Di 2023-11-29 17:35:59 +08:00
parent c7ee46e7f8
commit 02dc00a47e
7 changed files with 128 additions and 24 deletions

View file

@ -100,6 +100,7 @@ export class API {
id?: string;
isDeleted?: boolean;
frameId?: ExcalidrawElement["id"] | null;
fractionalIndex: ExcalidrawElement["fractionalIndex"];
groupIds?: string[];
// generic element props
strokeColor?: ExcalidrawGenericElement["strokeColor"];
@ -167,6 +168,7 @@ export class API {
x,
y,
frameId: rest.frameId ?? null,
fractionalIndex: rest.fractionalIndex ?? Infinity,
angle: rest.angle ?? 0,
strokeColor: rest.strokeColor ?? appState.currentItemStrokeColor,
backgroundColor: