diff --git a/src/components/controls/controls.js b/src/components/controls/controls.js index 79a43e662fb0a63e545f7ef3a2694cdeba775c68..7318f7ed9762c967b9c59b0cc4b4e74d1784842e 100644 --- a/src/components/controls/controls.js +++ b/src/components/controls/controls.js @@ -25,7 +25,6 @@ function Controls({mapOn, frequenciesOn}) { return ( - {t("sidebar:Date Range")} diff --git a/src/components/tree/phyloTree/defaultParams.js b/src/components/tree/phyloTree/defaultParams.js index e2d97ce681b485ba89830727bb9468f0815acf0f..0492830bb297bd69a2151f018d58f6a8e703f932 100644 --- a/src/components/tree/phyloTree/defaultParams.js +++ b/src/components/tree/phyloTree/defaultParams.js @@ -36,9 +36,11 @@ export const createDefaultParams = () => ({ tipLabelPadX: 8, tipLabelPadY: 2, mapToScreenDebounceTime: 500, + tipLabelFontSizeL0: 6, tipLabelFontSizeL1: 8, tipLabelFontSizeL2: 10, tipLabelFontSizeL3: 12, + tipLabelBreakL0: 150, tipLabelBreakL1: 75, tipLabelBreakL2: 50, tipLabelBreakL3: 25 diff --git a/src/components/tree/phyloTree/labels.js b/src/components/tree/phyloTree/labels.js index 29348c5096af77eb81f5916be10e9b8f7d746508..8aae5ff6007e4e18487e37e622afd21f1f167654 100644 --- a/src/components/tree/phyloTree/labels.js +++ b/src/components/tree/phyloTree/labels.js @@ -19,14 +19,16 @@ export const updateTipLabels = function updateTipLabels(dt) { const inViewVisibleTips = inViewTips.filter((d) => d.visibility === NODE_VISIBLE); /* We show tip labels by checking the number of "inView & visible" tips */ - if (inViewVisibleTips.length < this.params.tipLabelBreakL1) { + if (inViewVisibleTips.length < this.params.tipLabelBreakL0) { /* We calculate font size based on the total number of in view tips (both visible & non-visible) */ - let fontSize = this.params.tipLabelFontSizeL1; + let fontSize = this.params.tipLabelFontSizeL0; if (inViewTips.length < this.params.tipLabelBreakL3) { fontSize = this.params.tipLabelFontSizeL3; } else if (inViewTips.length < this.params.tipLabelBreakL2) { fontSize = this.params.tipLabelFontSizeL2; + } else if (inViewTips.length < this.params.tipLabelBreakL1) { + fontSize = this.params.tipLabelFontSizeL1; } window.setTimeout(() => {