From 8856983597a4066aae6a0f42e0bb9dbd25e28d20 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 29 Dec 2024 23:39:23 -0500 Subject: [PATCH] Upstream cursor style (#405) --- src/LGraphCanvas.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index e9644c7ee..27ef37acf 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -3073,8 +3073,12 @@ export class LGraphCanvas { this.state.hoveringOver = underPointer if (this.state.shouldSetCursor) { - if (!underPointer) { - this.canvas.style.cursor = "" + if (this.state.draggingCanvas) { + this.canvas.style.cursor = "grabbing" + } else if (this.state.readOnly) { + this.canvas.style.cursor = "grab" + } else if (!underPointer) { + this.canvas.style.cursor = "default" } else if (underPointer & CanvasItem.ResizeSe) { this.canvas.style.cursor = "se-resize" } else if (underPointer & CanvasItem.Node) {