Skip to content

Commit a6ce0e3

Browse files
committed
Correct bug that causes bars of previous canvas to be displayed if a new tree is made
1 parent c4a5332 commit a6ce0e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jsphylosvg.js

+3
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,9 @@ Smits.PhyloCanvas.NewickParse.prototype = {
646646
Smits.PhyloCanvas.Render.Parameters.integratedBinaryCharts.push(charts[i][j]);
647647
} else if (charts[i][j].type == "bar"){
648648
charts[i][j].chart = i;
649+
if (Smits.PhyloCanvas.Render.Parameters.barCharts.length == 1){
650+
Smits.PhyloCanvas.Render.Parameters.barCharts.shift();
651+
}
649652
Smits.PhyloCanvas.Render.Parameters.barCharts.push(charts[i][j]);
650653
}
651654
}

0 commit comments

Comments
 (0)