graph tweaks

main
Jay Hankins 2022-08-28 18:08:11 -04:00
parent bb86aa11bd
commit 6d7a627969
1 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@
const STROKE = 1;
const FONT_SIZE = 16;
const TICKS = 200;
const FONT_BASELINE = 40;
const FONT_BASELINE = 30;
const MAX_LABEL_LENGTH = 50;
const graphData = {% include notes_graph.json %}
@ -225,7 +225,7 @@
const font = Math.max(Math.round(zoomOrKeep(FONT_SIZE)), 1);
text.attr("font-size", (d) => font);
text.attr("y", (d) => d.y - zoomOrKeep(FONT_BASELINE) + 8);
text.attr("y", (d) => d.y - zoomOrKeep(FONT_BASELINE)+3);
link.attr("stroke-width", zoomOrKeep(STROKE));
node.attr("r", (d) => {
return zoomOrKeep(nodeSize[d.id]);
@ -299,6 +299,7 @@
const zoomHandler = d3.zoom().scaleExtent([0.2, 3]).on("zoom", resize);
zoomHandler(svg);
d3.select('svg').call(zoomHandler.scaleBy, 0.8);
restart();
function isCurrentPath(notePath) {