Thank you MO!
Here is another one you might like.
Modification to the Node Editor to allow the program name to always appear at the bottom of the display.
Program file 'main.js'
Modify this location:
code:
//rendering
if (this.onRender) this.onRender(canvas, ctx);
//info widget
if (this.show_info) this.renderInfo(ctx);
Add the five lines to the info widget area:
code:
//rendering
if (this.onRender) this.onRender(canvas, ctx);
//info widget
if (this.show_info) this.renderInfo(ctx);
///////////// 4-17-2022 wjh
ctx.clearRect(0, canvas.height - 20, canvas.width, canvas.height);
var dpir = this.pixelRatio * this.uiRatio;
ctx.font = "bold " + 14 * dpir + "px Arial";
ctx.fillStyle = LiteGraph.NODE_INFO;
ctx.fillText(this.graph.filename, 5, this.bgcanvas.height - 3 * dpir);
///////////
Comment out this line. It is a part of a different routine not required.
code:
// >>> ctx.fillText(this.graph.filename, 5, this.bgcanvas.height - 3 * dpir); // 4-17-2022 wjh
From this location:
code:
LGraphCanvas.prototype.renderInfo = function (ctx, x, y) {
x = x || 0;
y = y || 0;
ctx.save();
ctx.translate(x, y);
var dpir = this.pixelRatio * this.uiRatio;
ctx.font = 12 * dpir + "px Arial";
ctx.fillStyle = LiteGraph.NODE_INFO;
if (this.graph) {
ctx.fillText("Total: " + this.graph.elapsed_time.toFixed(0) + " ms", 5, dpir * 15 * 1);
ctx.fillText("FPS:" + this.fps.toFixed(0), 5, dpir * 15 * 2);
ctx.fillText("F: " + this.frame, 5, dpir * 15 * 3);
ctx.fillText(this.graph.blocked ? "Graph blocked" : "", 5, dpir * 15 * 4);
// >>> ctx.fillText(this.graph.filename, 5, this.bgcanvas.height - 3 * dpir); // 4-17-2022 wjh
} else ctx.fillText("No graph selected", 5, 13 * 1);
ctx.restore();
}