mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
edit text when clicked on with text tool (#1283)
This commit is contained in:
parent
d3ed5a42fc
commit
e9b4700bba
4 changed files with 40 additions and 56 deletions
|
@ -6,8 +6,7 @@ import { hasBackground, hasStroke, hasText, getTargetElement } from "../scene";
|
|||
import { t } from "../i18n";
|
||||
import { SHAPES } from "../shapes";
|
||||
import { ToolButton } from "./ToolButton";
|
||||
import { capitalizeString, getShortcutKey } from "../utils";
|
||||
import { CURSOR_TYPE } from "../constants";
|
||||
import { capitalizeString, getShortcutKey, setCursorForShape } from "../utils";
|
||||
import Stack from "./Stack";
|
||||
import useIsMobile from "../is-mobile";
|
||||
|
||||
|
@ -115,8 +114,7 @@ export function ShapesSwitcher({
|
|||
multiElement: null,
|
||||
selectedElementIds: {},
|
||||
});
|
||||
document.documentElement.style.cursor =
|
||||
value === "text" ? CURSOR_TYPE.TEXT : CURSOR_TYPE.CROSSHAIR;
|
||||
setCursorForShape(value);
|
||||
setAppState({});
|
||||
}}
|
||||
></ToolButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue