Move element into package

This commit is contained in:
Marcel Mraz 2025-03-13 13:37:13 +01:00
parent 45ac15ab40
commit 54f5c0e156
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
40 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import { getSelectedElements } from "../scene";
import type { UIAppState } from "../types";
import type { NonDeletedExcalidrawElement } from "./types";
export const showSelectedShapeActions = (
appState: UIAppState,
elements: readonly NonDeletedExcalidrawElement[],
) =>
Boolean(
!appState.viewModeEnabled &&
appState.openDialog?.name !== "elementLinkSelector" &&
((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),
);