Skip to content

Commit

Permalink
nextstrain#915: determine whether tip label should be shown based on …
Browse files Browse the repository at this point in the history
…count of fully visible nodes, not all in-view nodes
  • Loading branch information
frogsquire committed Apr 5, 2020
1 parent 22fd0b2 commit b553a32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/tree/phyloTree/labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ export const updateTipLabels = function updateTipLabels(dt) {
const yPad = this.params.tipLabelPadY;
const inViewTerminalNodes = this.nodes
.filter((d) => d.terminal)
.filter((d) => d.inView);
.filter((d) => d.inView)
.filter((d) => d.visibility == NODE_VISIBLE);

// console.log(`there are ${inViewTerminalNodes.length} nodes in view`)

if (inViewTerminalNodes.length < this.params.tipLabelBreakL1) {

let fontSize = this.params.tipLabelFontSizeL1;
Expand Down

0 comments on commit b553a32

Please sign in to comment.