Explorar o código

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

David Luzar %!s(int64=3) %!d(string=hai) anos
pai
achega
2537b225ac
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      src/element/showSelectedShapeActions.ts

+ 4 - 3
src/element/showSelectedShapeActions.ts

@@ -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,
   );