From 4bf0b1ac9c79d717ce680c39efde3931b1afad52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 4 Aug 2020 17:27:33 +0200 Subject: [PATCH] chg: make minimal height bigger --- website/web/static/tree.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/web/static/tree.js b/website/web/static/tree.js index 6d3d655f..8440d1f0 100644 --- a/website/web/static/tree.js +++ b/website/web/static/tree.js @@ -85,7 +85,7 @@ function hostnode_click_popup(d) { function LocateNode(urlnode_uuid) { var element = document.getElementById("node_" + urlnode_uuid); - element.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"}); + element.scrollIntoView({behavior: "smooth", block: "center", inline: "center"}); var line_arrow = d3.select("#node_" + urlnode_uuid) .append('g') @@ -316,8 +316,8 @@ function update(root, computed_node_width=0) { // Re-compute SVG size depending on the generated tree var newWidth = Math.max((max_depth + 1) * computed_node_width, node_width); // Update height - // node_height is the height of a node, node_height * 10 is the minimum so the root node isn't behind the lookyloo icon - var newHeight = Math.max(root.descendants().reverse().length * node_height, 10 * node_height); + // node_height is the height of a node, node_height * 25 is the minimum so the root node isn't behind the menu + var newHeight = Math.max(root.descendants().reverse().length * node_height, 25 * node_height); tree.size([newHeight, newWidth]) // Set background based on the computed width and height