2020-03-01 14:39:03 -05:00
|
|
|
import { AppState } from "../types";
|
|
|
|
import { ExcalidrawElement } from "./types";
|
|
|
|
import { getSelectedElements } from "../scene";
|
|
|
|
|
|
|
|
export const showSelectedShapeActions = (
|
|
|
|
appState: AppState,
|
|
|
|
elements: readonly ExcalidrawElement[],
|
|
|
|
) =>
|
|
|
|
Boolean(
|
|
|
|
appState.editingElement ||
|
2020-03-08 10:20:55 -07:00
|
|
|
getSelectedElements(elements, appState).length ||
|
2020-03-01 14:39:03 -05:00
|
|
|
appState.elementType !== "selection",
|
|
|
|
);
|