excalidraw/src/actions/actionDeleteSelected.tsx
Christopher Chedeau 9fa69448e4
Remove Delete from panel (#322)
Now that we have context menu, we don't need it there
2020-01-11 16:11:21 -08:00

16 lines
431 B
TypeScript

import { Action } from "./types";
import { deleteSelectedElements } from "../scene";
import { KEYS } from "../keys";
export const actionDeleteSelected: Action = {
name: "deleteSelectedElements",
perform: elements => {
return {
elements: deleteSelectedElements(elements)
};
},
contextItemLabel: "Delete",
contextMenuOrder: 3,
keyTest: event => event.key === KEYS.BACKSPACE || event.key === KEYS.DELETE
};