From e234ee64715b5db5f4f2ce7be92999f059e6f83b Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:15:58 -0700 Subject: [PATCH] Avoid rendering branches for the first node This is a follow-up to 937c68cf223e292f1c1322c508cbbf1f9f889333, which added a dummy node as the first node. --- src/components/tree/phyloTree/renderers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/tree/phyloTree/renderers.js b/src/components/tree/phyloTree/renderers.js index ebb3f7f14..46bd6deee 100644 --- a/src/components/tree/phyloTree/renderers.js +++ b/src/components/tree/phyloTree/renderers.js @@ -181,7 +181,7 @@ export const drawBranches = function drawBranches() { } else { this.groups.branchTee .selectAll('.branch') - .data(this.nodes.filter((d) => d.n.hasChildren)) + .data(this.nodes.filter((d) => d.n.hasChildren && d.displayOrder !== undefined)) .enter() .append("path") .attr("class", "branch T") @@ -213,7 +213,7 @@ export const drawBranches = function drawBranches() { } this.groups.branchStem .selectAll('.branch') - .data(this.nodes) + .data(this.nodes.filter((d) => d.displayOrder !== undefined)) .enter() .append("path") .attr("class", "branch S")