From 17099110514d0062ae3aa4cc999f904069fe3b48 Mon Sep 17 00:00:00 2001 From: Lichene Date: Fri, 14 Nov 2025 13:46:56 +0100 Subject: [PATCH] notes links invisible fix --- public/js/arf.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/js/arf.js b/public/js/arf.js index f9be546..d0aeb05 100644 --- a/public/js/arf.js +++ b/public/js/arf.js @@ -117,11 +117,19 @@ function update(source) { ); }) .append("svg:text") - .attr("x", 80) // Fixed position - adjust this number as needed + .attr("x", function (d) { + // Get the sibling text element (the node name) and calculate position + var nameText = this.parentNode.previousSibling.querySelector("text"); + if (nameText) { + return 10 + nameText.getComputedTextLength() + 5; // 5px gap + } + return 80; // fallback + }) .attr("dy", ".35em") .attr("text-anchor", "start") .text("[Notes]") .style("fill", "brown") + .style("font-size", "0.85em") // Smaller font .style("fill-opacity", 1e-6) .style("text-decoration", "underline"); // END OF NEW CODE