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:
Ryan Di 2024-08-06 19:26:06 +08:00 committed by GitHub
parent 8d530cf102
commit 3cf14c73a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 554 additions and 684 deletions

View file

@ -29,7 +29,6 @@ exports[`exportToSvg > with default arguments 1`] = `
"currentItemTextAlign": "left",
"cursorButton": "up",
"defaultSidebarDockedPreference": false,
"draggingElement": null,
"editingElement": null,
"editingFrame": null,
"editingGroupId": null,
@ -58,6 +57,7 @@ exports[`exportToSvg > with default arguments 1`] = `
"lastPointerDownWith": "mouse",
"multiElement": null,
"name": "name",
"newElement": null,
"objectsSnapModeEnabled": false,
"openDialog": null,
"openMenu": null,