Prefer arrow functions (#2344)

This commit is contained in:
Lipis
2020-11-06 22:06:39 +02:00
committed by GitHub
parent e05acd6fd9
commit a20f3240fd
19 changed files with 304 additions and 336 deletions

View File

@@ -23,11 +23,11 @@ const enableActionGroup = (
appState: AppState,
) => getSelectedElements(getNonDeletedElements(elements), appState).length > 1;
function alignSelectedElements(
const alignSelectedElements = (
elements: readonly ExcalidrawElement[],
appState: Readonly<AppState>,
alignment: Alignment,
) {
) => {
const selectedElements = getSelectedElements(
getNonDeletedElements(elements),
appState,
@@ -38,7 +38,7 @@ function alignSelectedElements(
const updatedElementsMap = getElementMap(updatedElements);
return elements.map((element) => updatedElementsMap[element.id] || element);
}
};
export const actionAlignTop = register({
name: "alignTop",