From 35789ceff7aa633b56b5ede6470776eeb2328dbc Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 27 May 2022 16:33:12 -0400 Subject: [PATCH] Fix plots tab cut off --- src/shared/components/plots/PlotUtils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/components/plots/PlotUtils.ts b/src/shared/components/plots/PlotUtils.ts index 6f05db4db24..73129e74381 100644 --- a/src/shared/components/plots/PlotUtils.ts +++ b/src/shared/components/plots/PlotUtils.ts @@ -56,8 +56,8 @@ export function getBottomLegendHeight( const numRows = Math.ceil(legendData.length / legendItemsPerRow); let itemsHeight = Math.max(...legendData.map(getLegendDataHeight)) * numRows; - // add room for between rows - itemsHeight += 20 * (numRows - 1); + // add room around rows + itemsHeight += 10 * numRows; let titleHeight = 0; if (_legendTitle) { @@ -69,8 +69,8 @@ export function getBottomLegendHeight( CBIOPORTAL_VICTORY_THEME.legend.style.title.fontSize + 'px' ) ); - // add room for between lines - titleHeight += 10 * (legendTitle.length - 1); + // add room around lines + titleHeight += 10 * legendTitle.length; } return Math.max(itemsHeight, titleHeight);