ccbbdb75a6
* Get rid of isSelected, canvas, canvasZoom, canvasOffsetX and canvasOffsetY on ExcalidrawElement. * Fix most unit tests. Fix cmd a. Fix alt drag * Focus on paste * shift select should include previously selected items * Fix last test * Move this.shape out of ExcalidrawElement and into a WeakMap
14 lines
389 B
TypeScript
14 lines
389 B
TypeScript
import { AppState } from "../types";
|
|
import { ExcalidrawElement } from "./types";
|
|
import { getSelectedElements } from "../scene";
|
|
|
|
export const showSelectedShapeActions = (
|
|
appState: AppState,
|
|
elements: readonly ExcalidrawElement[],
|
|
) =>
|
|
Boolean(
|
|
appState.editingElement ||
|
|
getSelectedElements(elements, appState).length ||
|
|
appState.elementType !== "selection",
|
|
);
|