diff --git a/src/components/tree/phyloTree/change.js b/src/components/tree/phyloTree/change.js index dc6893146..b32e95628 100644 --- a/src/components/tree/phyloTree/change.js +++ b/src/components/tree/phyloTree/change.js @@ -357,10 +357,12 @@ export const change = function change({ // todo: this is fairly slow: show something to show recalculating? or, get the d3 transition working? if (splitTreeByTrait) { setSplitTreeYValues(this.nodes, splitTreeByTrait); + this.params.isTreeSplitByTrait = true; } else if (resetTreeYValues) { setYValues(this.nodes); + this.params.isTreeSplitByTrait = false; } /* run calculations as needed - these update properties on the phylotreeNodes (similar to updateNodesWithNewData) */ diff --git a/src/components/tree/phyloTree/renderers.js b/src/components/tree/phyloTree/renderers.js index 3c8b1ded9..d7e3df0b4 100644 --- a/src/components/tree/phyloTree/renderers.js +++ b/src/components/tree/phyloTree/renderers.js @@ -172,7 +172,7 @@ export const drawBranches = function drawBranches() { if (!("branchTee" in this.groups)) { this.groups.branchTee = this.svg.append("g").attr("id", "branchTee"); } - if (this.layout === "clock" || this.layout === "unrooted") { + if (this.layout === "clock" || this.layout === "unrooted" || params.isTreeSplitByTrait) { this.groups.branchTee.selectAll("*").remove(); } else { this.groups.branchTee