diff --git a/src/litegraph.js b/src/litegraph.js index 059a4e50d..a02eb7b2a 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7471,7 +7471,9 @@ LGraphNode.prototype.executeAction = function(action) * @method adjustMouseEvent **/ LGraphCanvas.prototype.adjustMouseEvent = function(e) { - + var clientX_rel = 0; + var clientY_rel = 0; + if (this.canvas) { var b = this.canvas.getBoundingClientRect(); clientX_rel = e.clientX - b.left;