diff --git a/client/src/components/leftSidebar/topLeftLogoAndTitle.js b/client/src/components/leftSidebar/topLeftLogoAndTitle.js index 5c2ed24b..a4acfc06 100644 --- a/client/src/components/leftSidebar/topLeftLogoAndTitle.js +++ b/client/src/components/leftSidebar/topLeftLogoAndTitle.js @@ -41,7 +41,8 @@ class LeftSideBar extends React.Component { userSelect: "none" }} > - cell × - gene + + gene
- {datasetTitle} + {datasetTitle.length > globals.datasetTitleMaxCharacterCount + ? `${datasetTitle.substring( + 0, + Math.floor(globals.datasetTitleMaxCharacterCount / 2) + )}…${datasetTitle.slice( + -Math.floor(globals.datasetTitleMaxCharacterCount / 2) + )}` + : datasetTitle}
); diff --git a/client/src/globals.js b/client/src/globals.js index 8970cd90..94ddc20b 100644 --- a/client/src/globals.js +++ b/client/src/globals.js @@ -50,6 +50,8 @@ export const maxParagraphWidth = 600; export const cellxgeneTitleLeftPadding = 14; export const cellxgeneTitleTopPadding = 7; +export const datasetTitleMaxCharacterCount = 25; + export const maxControlsWidth = 800; export const graphMargin = { top: 20, right: 10, bottom: 30, left: 40 };