2020-01-12 02:22:03 +04:00
|
|
|
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,
|
2020-01-11 16:11:21 -08:00
|
|
|
keyTest: event => event.key === KEYS.BACKSPACE || event.key === KEYS.DELETE
|
2020-01-12 02:22:03 +04:00
|
|
|
};
|