Skip to content

Commit

Permalink
Graph component #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 20, 2024
1 parent c0402c0 commit 0337ff9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})
Expand Down

0 comments on commit 0337ff9

Please sign in to comment.