mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support setting/resetting cursor from host (#5215)
* Support setting/resetting cursor type from host * add docs * minor
This commit is contained in:
parent
92f30f7ed6
commit
07ebd7c68c
6 changed files with 63 additions and 7 deletions
|
@ -301,7 +301,8 @@ export const setCursorForShape = (
|
|||
setEraserCursor(canvas, appState.theme);
|
||||
// do nothing if image tool is selected which suggests there's
|
||||
// a image-preview set as the cursor
|
||||
} else if (appState.activeTool.type !== "image") {
|
||||
// Ignore custom type as well and let host decide
|
||||
} else if (!["image", "custom"].includes(appState.activeTool.type)) {
|
||||
canvas.style.cursor = CURSOR_TYPE.CROSSHAIR;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue