mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
* refactor: rename elementType to activeTool * update docs * fix snap * update activeToll to be an object and review fixes * fix tests * fix
15 lines
507 B
TypeScript
15 lines
507 B
TypeScript
import { AppState } from "../types";
|
|
import { NonDeletedExcalidrawElement } from "./types";
|
|
import { getSelectedElements } from "../scene";
|
|
|
|
export const showSelectedShapeActions = (
|
|
appState: AppState,
|
|
elements: readonly NonDeletedExcalidrawElement[],
|
|
) =>
|
|
Boolean(
|
|
!appState.viewModeEnabled &&
|
|
(appState.editingElement ||
|
|
getSelectedElements(elements, appState).length ||
|
|
(appState.activeTool.type !== "selection" &&
|
|
appState.activeTool.type !== "eraser")),
|
|
);
|