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
|
@ -1,5 +1,6 @@
|
|||
import { FlooredNumber } from "./types";
|
||||
import { getZoomOrigin } from "./scene";
|
||||
import { CURSOR_TYPE } from "./constants";
|
||||
|
||||
export const SVG_NS = "http://www.w3.org/2000/svg";
|
||||
|
||||
|
@ -144,6 +145,14 @@ export function resetCursor() {
|
|||
document.documentElement.style.cursor = "";
|
||||
}
|
||||
|
||||
export function setCursorForShape(shape: string) {
|
||||
if (shape === "selection") {
|
||||
resetCursor();
|
||||
} else {
|
||||
document.documentElement.style.cursor = CURSOR_TYPE.CROSSHAIR;
|
||||
}
|
||||
}
|
||||
|
||||
export const isFullScreen = () =>
|
||||
document.fullscreenElement?.nodeName === "HTML";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue