mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
This reverts commit 16263e942b
.
This commit is contained in:
parent
16263e942b
commit
3d2e59bfed
19 changed files with 130 additions and 789 deletions
|
@ -1,27 +0,0 @@
|
|||
import { Action } from "./types";
|
||||
import { KEYS } from "../keys";
|
||||
import { clearSelection } from "../scene";
|
||||
|
||||
export const actionFinalize: Action = {
|
||||
name: "finalize",
|
||||
perform: (elements, appState) => {
|
||||
if (window.document.activeElement instanceof HTMLElement) {
|
||||
window.document.activeElement.blur();
|
||||
}
|
||||
return {
|
||||
elements: clearSelection(elements),
|
||||
appState: {
|
||||
...appState,
|
||||
elementType: "selection",
|
||||
draggingElement: null,
|
||||
multiElement: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
keyTest: (event, appState) =>
|
||||
(event.key === KEYS.ESCAPE &&
|
||||
!appState.draggingElement &&
|
||||
appState.multiElement === null) ||
|
||||
((event.key === KEYS.ESCAPE || event.key === KEYS.ENTER) &&
|
||||
appState.multiElement !== null),
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue