Fix maps title.

This commit is contained in:
Paulo Gustavo Veiga 2022-10-06 21:18:25 -07:00
parent e34c1649f1
commit a1edb09e91
2 changed files with 4 additions and 2 deletions

View File

@ -352,6 +352,7 @@ export function buildZoomToolbarConfiguration(isMobile: boolean, designer: Desig
export function buildEditorAppBarConfiguration( export function buildEditorAppBarConfiguration(
designer: Designer, designer: Designer,
mapTitle: string,
onAction: (type: ToolbarActionType) => void, onAction: (type: ToolbarActionType) => void,
save: () => void, save: () => void,
showOnlyCommonActions: boolean, showOnlyCommonActions: boolean,
@ -373,14 +374,14 @@ export function buildEditorAppBarConfiguration(
}, },
{ {
render: () => ( render: () => (
<Tooltip title={designer.getMindmap().getDescription()}> <Tooltip title={mapTitle}>
<Typography <Typography
className="truncated" className="truncated"
variant="body1" variant="body1"
component="div" component="div"
sx={{ marginX: '1.5rem' }} sx={{ marginX: '1.5rem' }}
> >
{designer.getMindmap().getDescription()} {mapTitle}
</Typography> </Typography>
</Tooltip> </Tooltip>
), ),

View File

@ -200,6 +200,7 @@ const Editor = ({
const locale = options.locale; const locale = options.locale;
const msg = I18nMsg.loadLocaleData(locale); const msg = I18nMsg.loadLocaleData(locale);
const menubarConfiguration = configurationBuilder.buildEditorAppBarConfiguration( const menubarConfiguration = configurationBuilder.buildEditorAppBarConfiguration(
options.mapTitle,
mindplotComponent?.getDesigner(), mindplotComponent?.getDesigner(),
onAction, onAction,
() => { () => {