Browse Source

feat: keep selected tool on canvas reset (#4728)

David Luzar 3 năm trước cách đây
mục cha
commit
050bc1ce2b
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/actions/actionCanvas.tsx

+ 2 - 0
src/actions/actionCanvas.tsx

@@ -65,6 +65,8 @@ export const actionClearCanvas = register({
         gridSize: appState.gridSize,
         showStats: appState.showStats,
         pasteDialog: appState.pasteDialog,
+        elementType:
+          appState.elementType === "image" ? "selection" : appState.elementType,
       },
       commitToHistory: true,
     };