This commit is contained in:
Paulo Gustavo Veiga 2022-10-24 19:06:38 -07:00
parent 0d2da200d6
commit e755c2fe8b
2 changed files with 3 additions and 13 deletions

View File

@ -41,6 +41,7 @@ import IconButton from '@mui/material/IconButton';
import { ToolbarActionType } from '../toolbar/ToolbarActionType'; import { ToolbarActionType } from '../toolbar/ToolbarActionType';
import MapInfo from '../../classes/model/map-info'; import MapInfo from '../../classes/model/map-info';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
import MapTitle from '../action-widget/pane/map-title';
interface AppBarProps { interface AppBarProps {
model: Editor; model: Editor;
@ -93,18 +94,7 @@ const AppBar = ({ model, mapInfo, capability, onAction, accountConfig }: AppBarP
visible: !capability.isHidden('appbar-title'), visible: !capability.isHidden('appbar-title'),
}, },
{ {
render: () => ( render: () => <MapTitle mapInfo={mapInfo} />,
<Tooltip title={mapInfo.getTitle()}>
<Typography
className="truncated"
variant="body1"
component="div"
sx={{ marginX: '1.5rem' }}
>
{mapInfo.getTitle()}
</Typography>
</Tooltip>
),
}, },
null, null,
{ {

View File

@ -40,7 +40,7 @@ const options: EditorOptions = {
ReactDOM.render( ReactDOM.render(
<Editor <Editor
mapInfo={new MapInfoImpl('welcome', 'Develop Map Title', false)} mapInfo={new MapInfoImpl(mapId, 'Develop Map Title', false)}
options={options} options={options}
persistenceManager={persistence} persistenceManager={persistence}
onAction={(action) => console.log('action called:', action)} onAction={(action) => console.log('action called:', action)}