mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Latest litegraph from upstream.
This commit is contained in:
parent
32f282c861
commit
c092ffcc18
@ -8099,11 +8099,15 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
bgcolor = bgcolor || LiteGraph.NODE_DEFAULT_COLOR;
|
bgcolor = bgcolor || LiteGraph.NODE_DEFAULT_COLOR;
|
||||||
hovercolor = hovercolor || "#555";
|
hovercolor = hovercolor || "#555";
|
||||||
textcolor = textcolor || LiteGraph.NODE_TEXT_COLOR;
|
textcolor = textcolor || LiteGraph.NODE_TEXT_COLOR;
|
||||||
var yFix = y + LiteGraph.NODE_TITLE_HEIGHT + 2; // fix the height with the title
|
var pos = this.ds.convertOffsetToCanvas(this.graph_mouse);
|
||||||
var pos = this.mouse;
|
var hover = LiteGraph.isInsideRectangle( pos[0], pos[1], x,y,w,h );
|
||||||
var hover = LiteGraph.isInsideRectangle( pos[0], pos[1], x,yFix,w,h );
|
pos = this.last_click_position ? [this.last_click_position[0], this.last_click_position[1]] : null;
|
||||||
pos = this.last_click_position;
|
if(pos) {
|
||||||
var clicked = pos && LiteGraph.isInsideRectangle( pos[0], pos[1], x,yFix,w,h );
|
var rect = this.canvas.getBoundingClientRect();
|
||||||
|
pos[0] -= rect.left;
|
||||||
|
pos[1] -= rect.top;
|
||||||
|
}
|
||||||
|
var clicked = pos && LiteGraph.isInsideRectangle( pos[0], pos[1], x,y,w,h );
|
||||||
|
|
||||||
ctx.fillStyle = hover ? hovercolor : bgcolor;
|
ctx.fillStyle = hover ? hovercolor : bgcolor;
|
||||||
if(clicked)
|
if(clicked)
|
||||||
|
Loading…
Reference in New Issue
Block a user