Browse Source

reset to default tool after clearing out the canvas

Ryan Di 1 tháng trước cách đây
mục cha
commit
385cb347bb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/excalidraw/actions/actionCanvas.tsx

+ 1 - 1
packages/excalidraw/actions/actionCanvas.tsx

@@ -121,7 +121,7 @@ export const actionClearCanvas = register({
         pasteDialog: appState.pasteDialog,
         activeTool:
           appState.activeTool.type === "image"
-            ? { ...appState.activeTool, type: "selection" }
+            ? { ...appState.activeTool, type: app.defaultSelectionTool }
             : appState.activeTool,
       },
       captureUpdate: CaptureUpdateAction.IMMEDIATELY,