5e1ff7cafe
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
19 lines
685 B
TypeScript
19 lines
685 B
TypeScript
import type { NonDeletedExcalidrawElement } from "./types";
|
|
import { getSelectedElements } from "../scene";
|
|
import type { UIAppState } from "../types";
|
|
|
|
export const showSelectedShapeActions = (
|
|
appState: UIAppState,
|
|
elements: readonly NonDeletedExcalidrawElement[],
|
|
) =>
|
|
Boolean(
|
|
!appState.viewModeEnabled &&
|
|
((appState.activeTool.type !== "custom" &&
|
|
(appState.editingTextElement ||
|
|
(appState.activeTool.type !== "selection" &&
|
|
appState.activeTool.type !== "eraser" &&
|
|
appState.activeTool.type !== "hand" &&
|
|
appState.activeTool.type !== "laser"))) ||
|
|
getSelectedElements(elements, appState).length),
|
|
);
|