Skip to content

Commit

Permalink
#1008: hiding t-branches when split by state
Browse files Browse the repository at this point in the history
  • Loading branch information
frogsquire committed May 5, 2020
1 parent 59e7629 commit 2870aa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/tree/phyloTree/change.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
2 changes: 1 addition & 1 deletion src/components/tree/phyloTree/renderers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2870aa3

Please sign in to comment.