mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Eraser toggle to switch back to the previous tool (#4981)
* add typeBeforeEraser * ESC to switch to lastActiveToolBeforeEraser
This commit is contained in:
parent
f242721f3b
commit
1331cffe93
3 changed files with 24 additions and 6 deletions
|
@ -77,7 +77,10 @@ export type AppState = {
|
|||
// (e.g. text element when typing into the input)
|
||||
editingElement: NonDeletedExcalidrawElement | null;
|
||||
editingLinearElement: LinearElementEditor | null;
|
||||
activeTool: { type: typeof SHAPES[number]["value"] | "eraser" };
|
||||
activeTool: {
|
||||
type: typeof SHAPES[number]["value"] | "eraser";
|
||||
lastActiveToolBeforeEraser?: typeof SHAPES[number]["value"];
|
||||
};
|
||||
elementLocked: boolean;
|
||||
penMode: boolean;
|
||||
penDetected: boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue