mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: rename draggingElement
-> newElement
(#8294)
* add newElement to appState * freedraw should not be an editing element * do not set editing element for freedraw and generic * remove ununsed `appState.draggingElement` * remove setting dragged for new linear element * decouple selection element from new element * fix hint for text bindables * update snapshot * fixes * fix frame regressions * add comments to types * document `editingElement` --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
8d530cf102
commit
3cf14c73a3
17 changed files with 554 additions and 684 deletions
|
@ -26,7 +26,7 @@ const shouldDiscardRemoteElement = (
|
|||
// local element is being edited
|
||||
(local.id === localAppState.editingElement?.id ||
|
||||
local.id === localAppState.resizingElement?.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.id === localAppState.newElement?.id || // TODO: Is this still valid? As newElement 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue