From 26ed2a055ca66116dc3f6fc61c54bc9bf5ea30be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=91=E6=9E=97=5FCyril=20Pilgrim?= Date: Sun, 1 Mar 2026 17:04:41 +0800 Subject: [PATCH] fix(ui): move token usage display below the node's bottom boundary to prevent overlapping with existing bottom widgets --- web/js/display_tokens.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/web/js/display_tokens.js b/web/js/display_tokens.js index dc57bec..9c8500d 100644 --- a/web/js/display_tokens.js +++ b/web/js/display_tokens.js @@ -19,18 +19,12 @@ app.registerExtension({ ctx.fillStyle = "rgba(160, 160, 160, 0.9)"; ctx.textAlign = "right"; - // Draw below the output slots on the right side - let startY = 40; - if (this.outputs && this.outputs.length > 0) { - startY = (this.outputs.length * 20) + 30; // estimate slot space - } - - // Align to the bottom right area of the node + // Draw completely below the node to avoid overlapping with bottom widgets const lines = this._llm_token_usage; - let drawY = Math.max(startY, this.size[1] - (lines.length * 16) - 10); + let drawY = this.size[1] + 16; for (let i = 0; i < lines.length; i++) { - ctx.fillText(lines[i], this.size[0] - 15, drawY + (i * 16)); + ctx.fillText(lines[i], this.size[0] - 10, drawY + (i * 16)); } ctx.restore(); }