mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: multiplayer undo / redo (#7348)
This commit is contained in:
parent
5211b003b8
commit
530617be90
71 changed files with 34885 additions and 14877 deletions
|
@ -199,6 +199,24 @@ export type InteractiveCanvasAppState = Readonly<
|
|||
}
|
||||
>;
|
||||
|
||||
export type ObservedAppState = ObservedStandaloneAppState &
|
||||
ObservedElementsAppState;
|
||||
|
||||
export type ObservedStandaloneAppState = {
|
||||
name: AppState["name"];
|
||||
viewBackgroundColor: AppState["viewBackgroundColor"];
|
||||
};
|
||||
|
||||
export type ObservedElementsAppState = {
|
||||
editingGroupId: AppState["editingGroupId"];
|
||||
selectedElementIds: AppState["selectedElementIds"];
|
||||
selectedGroupIds: AppState["selectedGroupIds"];
|
||||
// Avoiding storing whole instance, as it could lead into state incosistencies, empty undos/redos and etc.
|
||||
editingLinearElementId: LinearElementEditor["elementId"] | null;
|
||||
// Right now it's coupled to `editingLinearElement`, ideally it should not be really needed as we already have selectedElementIds & editingLinearElementId
|
||||
selectedLinearElementId: LinearElementEditor["elementId"] | null;
|
||||
};
|
||||
|
||||
export interface AppState {
|
||||
contextMenu: {
|
||||
items: ContextMenuItems;
|
||||
|
@ -489,7 +507,7 @@ export type SceneData = {
|
|||
elements?: ImportedDataState["elements"];
|
||||
appState?: ImportedDataState["appState"];
|
||||
collaborators?: Map<SocketId, Collaborator>;
|
||||
commitToHistory?: boolean;
|
||||
commitToStore?: boolean;
|
||||
};
|
||||
|
||||
export enum UserIdleState {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue