Leaves need to end with [N] in order to have the Notes attached
All checks were successful
Updates the graph by copying the updated files in the right directory / build-and-deploy (push) Successful in 13s

This commit is contained in:
CawaAlreadyTaken 2025-11-16 10:34:05 +01:00
parent d4e53a519b
commit 01a3f0bde5
2 changed files with 10 additions and 12 deletions

View file

@ -215,7 +215,7 @@
"url": "https://github.com/vec2text/vec2text" "url": "https://github.com/vec2text/vec2text"
}, },
{ {
"name": "Text Embeddings Reveal (Almost) As Much As Text", "name": "Text Embeddings Reveal (Almost) As Much As Text [N]",
"type": "url", "type": "url",
"url": "https://openreview.net/pdf?id=wK7wUdiM5g0" "url": "https://openreview.net/pdf?id=wK7wUdiM5g0"
} }

View file

@ -102,22 +102,19 @@ function update(source) {
}) })
.style("fill-opacity", 1e-6); .style("fill-opacity", 1e-6);
// Add Notes link for leaf nodes only // Add Notes link for leaf nodes whose name ends with [N]
nodeEnter nodeEnter
.filter(function (d) { .filter(function (d) {
return !d.children && !d._children; // foglia + nome che termina con [N]
return !d.children && !d._children && /\[N\]$/.test(d.name);
}) })
.append("a") .append("a")
.attr("target", "_blank") .attr("target", "_blank")
.attr("xlink:href", (d) => "viewer.html?file=notes/" + d.name + ".md") .attr("xlink:href", function (d) {
.attr("target", "_blank") // ← open in new tab // stesso nome ma senza [N] per il file delle note
/* .attr("xlink:href", function (d) { var baseName = d.name.replace(/\s*\[N\]$/, "");
return ( return "viewer.html?file=notes/" + baseName + ".md";
"https://git.hackinpovo.it/HackInPovo/resources/raw/branch/main/notes/" + })
d.name +
".txt"
);
})*/
.append("svg:text") .append("svg:text")
.attr("x", function (d) { .attr("x", function (d) {
// Get the sibling text element (the node name) and calculate position // Get the sibling text element (the node name) and calculate position
@ -134,6 +131,7 @@ function update(source) {
.style("font-size", "0.85em") // Smaller font .style("font-size", "0.85em") // Smaller font
.style("fill-opacity", 1e-6) .style("fill-opacity", 1e-6)
.style("text-decoration", "underline"); .style("text-decoration", "underline");
// END OF NEW CODE // END OF NEW CODE
nodeEnter.append("svg:title").text(function (d) { nodeEnter.append("svg:title").text(function (d) {