From 5a65f472fb2bf26028314a6de20697ca4ee63dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 11 Dec 2020 23:21:07 +0100 Subject: [PATCH] fix: Expand the background to cover the last node --- website/web/static/tree.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/web/static/tree.js b/website/web/static/tree.js index 65fc00dd..8a23f2ba 100644 --- a/website/web/static/tree.js +++ b/website/web/static/tree.js @@ -328,7 +328,9 @@ function update(root, computed_node_width=0) { // Set background based on the computed width and height let background = main_svg.insert('rect', ':first-child') .attr('y', 0) - .attr('width', newWidth + (margin.right + margin.left)) + // Note: We want the background width with an extra computed_node_width + // in order to make sure the last node is completely covered + .attr('width', newWidth + (margin.right + margin.left + computed_node_width)) .attr('height', newHeight + margin.top + margin.bottom) .style('fill', "url(#backstripes)");