From 8a633a6c1cef259295c7f1dc28a70802c91a6334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 31 Dec 2020 19:32:08 +0100 Subject: [PATCH] chg: Small cleanup --- website/web/static/tree.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/web/static/tree.js b/website/web/static/tree.js index d75a7db..c8dd838 100644 --- a/website/web/static/tree.js +++ b/website/web/static/tree.js @@ -414,14 +414,12 @@ function update(root, computed_node_width=0) { }); // Rectangle around the domain name & icons - let selected_node_bbox_init = d3.select(this).node().getBBox(); d3.select(this).select('rect') .attr('height', node_height + 5) - .attr('width', selected_node_bbox_init.width + 50); - + .attr('width', d3.select(this).node().getBBox().width + 60); // Set the width for all the nodes - let selected_node_bbox = d3.select(this).select('rect').node().getBBox(); // Required, as the node width need to include the rectangle + let selected_node_bbox = d3.select(this).node().getBBox(); // Required, as the node width need to include the rectangle d.node_width = selected_node_bbox.width; node_width = node_width > selected_node_bbox.width ? node_width : selected_node_bbox.width;