fix: hide sidebar when custom tool active (#5179)

This commit is contained in:
David Luzar 2022-05-11 14:42:52 +02:00 committed by GitHub
parent 4ee48d2729
commit 2537b225ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,10 @@ export const showSelectedShapeActions = (
elements: readonly NonDeletedExcalidrawElement[],
) =>
Boolean(
!appState.viewModeEnabled &&
(!appState.viewModeEnabled &&
appState.activeTool.type !== "custom" &&
(appState.editingElement ||
getSelectedElements(elements, appState).length ||
(appState.activeTool.type !== "selection" &&
appState.activeTool.type !== "eraser")),
appState.activeTool.type !== "eraser"))) ||
getSelectedElements(elements, appState).length,
);