mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
Change cursor shape to grab on dragging
This commit is contained in:
@@ -56,6 +56,19 @@ export class LGraphCanvas {
|
||||
black: { color: "#222", bgcolor: "#000", groupcolor: "#444" }
|
||||
};
|
||||
|
||||
public canvas: HTMLCanvasElement;
|
||||
|
||||
private _dragging_canvas: boolean = false;
|
||||
get dragging_canvas(): boolean {
|
||||
return this._dragging_canvas;
|
||||
}
|
||||
set dragging_canvas(value: boolean) {
|
||||
this._dragging_canvas = value;
|
||||
if (this.canvas) {
|
||||
this.canvas.style.cursor = value ? "grab" : "default";
|
||||
}
|
||||
}
|
||||
|
||||
constructor(canvas, graph, options) {
|
||||
this.options = options = options || {};
|
||||
|
||||
@@ -1106,8 +1119,6 @@ export class LGraphCanvas {
|
||||
this.connecting_links = null;
|
||||
this.highlighted_links = {};
|
||||
|
||||
this.dragging_canvas = false;
|
||||
|
||||
this.dirty_canvas = true;
|
||||
this.dirty_bgcanvas = true;
|
||||
this.dirty_area = null;
|
||||
|
||||
@@ -164,6 +164,9 @@ export class LiteGraphGlobal {
|
||||
|
||||
// Whether to highlight the bounding box of selected groups
|
||||
highlight_selected_group = false
|
||||
LGraphGroup: any;
|
||||
ContextMenu: any;
|
||||
availableCanvasOptions: any;
|
||||
|
||||
constructor() {
|
||||
//timer that works everywhere
|
||||
|
||||
Reference in New Issue
Block a user