mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support customType in activeTool (#5144)
* feat: support customType in activeTool * fix * rewrite types and handling * tweaks * fix Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
1ed1529f96
commit
64d330a332
12 changed files with 210 additions and 51 deletions
|
@ -12,6 +12,7 @@ import { getElementsInGroup } from "../groups";
|
|||
import { LinearElementEditor } from "../element/linearElementEditor";
|
||||
import { fixBindingsAfterDeletion } from "../element/binding";
|
||||
import { isBoundToContainer } from "../element/typeChecks";
|
||||
import { updateActiveTool } from "../utils";
|
||||
|
||||
const deleteSelectedElements = (
|
||||
elements: readonly ExcalidrawElement[],
|
||||
|
@ -134,7 +135,7 @@ export const actionDeleteSelected = register({
|
|||
elements: nextElements,
|
||||
appState: {
|
||||
...nextAppState,
|
||||
activeTool: { ...appState.activeTool, type: "selection" },
|
||||
activeTool: updateActiveTool(appState, { type: "selection" }),
|
||||
multiElement: null,
|
||||
},
|
||||
commitToHistory: isSomeElementSelected(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue