diff --git a/src/litegraph.js b/src/litegraph.js index abe5e501e..443d8d0e3 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -8103,6 +8103,11 @@ LGraphNode.prototype.executeAction = function(action) var pos = this.ds.convertOffsetToCanvas(this.graph_mouse); var hover = LiteGraph.isInsideRectangle( pos[0], pos[1], x,y,w,h ); pos = this.last_click_position; + if(pos) { + 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;