excalidraw/src/actions/actionSelectAll.ts
Fernando Alava Zambrano ff7a340d2f Internationalization support (#477)
* add i18next lib
add some translations

* add translations

* fix font-family

* fix pin versions
2020-01-20 15:14:10 -08:00

14 lines
354 B
TypeScript

import { Action } from "./types";
import { KEYS } from "../keys";
export const actionSelectAll: Action = {
name: "selectAll",
perform: elements => {
return {
elements: elements.map(elem => ({ ...elem, isSelected: true }))
};
},
contextItemLabel: "labels.selectAll",
keyTest: event => event[KEYS.META] && event.code === "KeyA"
};