Skip to content

Commit 9936e3d

Browse files
committed
Refactor LGraphCanvas drawButton click logic(2)
1 parent 676bb36 commit 9936e3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/litegraph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8102,7 +8102,7 @@ LGraphNode.prototype.executeAction = function(action)
81028102
textcolor = textcolor || LiteGraph.NODE_TEXT_COLOR;
81038103
var pos = this.ds.convertOffsetToCanvas(this.graph_mouse);
81048104
var hover = LiteGraph.isInsideRectangle( pos[0], pos[1], x,y,w,h );
8105-
pos = this.last_click_position;
8105+
pos = this.last_click_position ? [this.last_click_position[0], this.last_click_position[1]] : null;
81068106
if(pos) {
81078107
var rect = this.canvas.getBoundingClientRect();
81088108
pos[0] -= rect.left;

0 commit comments

Comments
 (0)