From c0ec1ce0a81ba3a5b631c33ee0ffee495e9ef818 Mon Sep 17 00:00:00 2001 From: Gauss Zhou <46297500+gausszhou@users.noreply.github.com> Date: Sun, 14 Nov 2021 00:19:12 +0800 Subject: [PATCH] fix: issues #272 We should avoid using undeclared variables --- src/litegraph.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/litegraph.js b/src/litegraph.js index 8591ed114..7cd538a7f 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7477,7 +7477,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;