Browse Source

fix: change cursor by tool change immediately (#8212)

YongJoon Kim 7 months ago
parent
commit
c92f3bebf5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/excalidraw/components/App.tsx

+ 4 - 1
packages/excalidraw/components/App.tsx

@@ -4695,7 +4695,10 @@ class App extends React.Component<AppProps, AppState> {
     if (nextActiveTool.type === "hand") {
       setCursor(this.interactiveCanvas, CURSOR_TYPE.GRAB);
     } else if (!isHoldingSpace) {
-      setCursorForShape(this.interactiveCanvas, this.state);
+      setCursorForShape(this.interactiveCanvas, {
+        ...this.state,
+        activeTool: nextActiveTool,
+      });
     }
     if (isToolIcon(document.activeElement)) {
       this.focusContainer();