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
|
@ -20,7 +20,7 @@ const shouldDiscardRemoteElement = (
|
|||
// local element is being edited
|
||||
(local.id === localAppState.editingElement?.id ||
|
||||
local.id === localAppState.resizingElement?.id ||
|
||||
local.id === localAppState.draggingElement?.id ||
|
||||
local.id === localAppState.draggingElement?.id || // TODO: Is this still valid? As draggingElement is selection element, which is never part of the elements array
|
||||
// local element is newer
|
||||
local.version > remote.version ||
|
||||
// resolve conflicting edits deterministically by taking the one with
|
||||
|
|
|
@ -294,7 +294,7 @@ const restoreElement = (
|
|||
};
|
||||
|
||||
/**
|
||||
* Repairs contaienr element's boundElements array by removing duplicates and
|
||||
* Repairs container element's boundElements array by removing duplicates and
|
||||
* fixing containerId of bound elements if not present. Also removes any
|
||||
* bound elements that do not exist in the elements array.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue