From 0337ff9f380723d6b0aa31605dff20150a8b557d Mon Sep 17 00:00:00 2001 From: Scobiform Date: Sat, 20 Apr 2024 18:46:37 +0200 Subject: [PATCH] Graph component #1 --- templates/graph.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/graph.html b/templates/graph.html index b54799f..4cc9d51 100644 --- a/templates/graph.html +++ b/templates/graph.html @@ -231,7 +231,9 @@ // Set the text color only white for instance nodes ctx.fillStyle = node.type === 'instance' ? '#F9F5F1' : ctx.fillStyle; - ctx.fillText(label, node.x, node.y); + + // Draw the text label based on the node type (instance larger) + ctx.fillText(label, node.x, node.y + imgSize / 2 + fontSize); ctx.restore(); })