diff --git a/src/components/tree/phyloTree/layouts.js b/src/components/tree/phyloTree/layouts.js index 4dca67b15..deab61fb4 100644 --- a/src/components/tree/phyloTree/layouts.js +++ b/src/components/tree/phyloTree/layouts.js @@ -279,6 +279,10 @@ export const mapToScreen = function mapToScreen() { right: this.params.margins.right, top: this.params.margins.top, bottom: this.params.margins.bottom}; + if (this.layout==="rect" || this.layout==="unrooted") { + // legend is 12px, but 6px is enough to prevent tips being obscured + tmpMargins.top += 6; + } const inViewTerminalNodes = this.nodes.filter((d) => d.terminal).filter((d) => d.inView); if (inViewTerminalNodes.length < this.params.tipLabelBreakL1) {