diff --git a/packages/mindplot/src/components/LocalStorageManager.ts b/packages/mindplot/src/components/LocalStorageManager.ts index 84d2e47f..0945305d 100644 --- a/packages/mindplot/src/components/LocalStorageManager.ts +++ b/packages/mindplot/src/components/LocalStorageManager.ts @@ -16,7 +16,6 @@ * limitations under the License. */ import $ from 'jquery'; -import { Mindmap } from '..'; import PersistenceManager from './PersistenceManager'; class LocalStorageManager extends PersistenceManager { @@ -64,7 +63,7 @@ class LocalStorageManager extends PersistenceManager { return $.parseXML(xml); } - unlockMap(mindmap: Mindmap) { + unlockMap(): void { // Ignore, no implementation required ... } } diff --git a/packages/mindplot/src/components/PersistenceManager.ts b/packages/mindplot/src/components/PersistenceManager.ts index d953580c..a56bb2c7 100644 --- a/packages/mindplot/src/components/PersistenceManager.ts +++ b/packages/mindplot/src/components/PersistenceManager.ts @@ -54,7 +54,7 @@ abstract class PersistenceManager { abstract saveMapXml(mapId: string, mapXml: Document, pref?, saveHistory?: boolean, events?); - abstract unlockMap(mindmap: Mindmap): void; + abstract unlockMap(mapId: string): void; static init = (instance: PersistenceManager) => { this._instance = instance; diff --git a/packages/mindplot/src/components/RestPersistenceManager.ts b/packages/mindplot/src/components/RestPersistenceManager.ts index b68410d4..4d734510 100644 --- a/packages/mindplot/src/components/RestPersistenceManager.ts +++ b/packages/mindplot/src/components/RestPersistenceManager.ts @@ -17,7 +17,6 @@ */ import { $assert } from '@wisemapping/core-js'; import $ from 'jquery'; -import { Mindmap } from '..'; import { $msg } from './Messages'; import PersistenceManager from './PersistenceManager'; @@ -132,8 +131,7 @@ class RESTPersistenceManager extends PersistenceManager { }); } - unlockMap(mindmap: Mindmap) { - const mapId = mindmap.getId(); + unlockMap(mapId: string):void { fetch( this.lockUrl.replace('{id}', mapId), { diff --git a/packages/mindplot/src/components/widget/IMenu.ts b/packages/mindplot/src/components/widget/IMenu.ts index d5941584..0ecfd5af 100644 --- a/packages/mindplot/src/components/widget/IMenu.ts +++ b/packages/mindplot/src/components/widget/IMenu.ts @@ -70,7 +70,11 @@ class IMenu { unlockMap(designer: Designer) { const mindmap = designer.getMindmap(); const persistenceManager = PersistenceManager.getInstance(); - persistenceManager.unlockMap(mindmap); + + // If the map could not be loaded, partial map load could happen. + if (mindmap) { + persistenceManager.unlockMap(mindmap.getId()); + } } save(saveElem: JQuery, designer: Designer, saveHistory: boolean) { diff --git a/packages/mindplot/src/components/widget/Menu.ts b/packages/mindplot/src/components/widget/Menu.ts index 15000e86..25ef72cb 100644 --- a/packages/mindplot/src/components/widget/Menu.ts +++ b/packages/mindplot/src/components/widget/Menu.ts @@ -57,7 +57,7 @@ class Menu extends IMenu { return result; }, - setValue(value) { + setValue(value: string) { designer.changeFontFamily(value); }, }; diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/publish-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/publish-dialog/index.tsx index d532cdb2..365ca3d3 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/publish-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/publish-dialog/index.tsx @@ -12,12 +12,12 @@ import FormControl from '@mui/material/FormControl'; import FormControlLabel from '@mui/material/FormControlLabel'; import Checkbox from '@mui/material/Checkbox'; import TabContext from '@mui/lab/TabContext'; -import AppBar from '@mui/material/AppBar'; import TabList from '@mui/lab/TabList'; import Tab from '@mui/material/Tab'; import TabPanel from '@mui/lab/TabPanel'; import Typography from '@mui/material/Typography'; import TextareaAutosize from '@mui/material/TextareaAutosize'; +import Box from '@mui/system/Box'; const PublishDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement => { const { map } = fetchMapById(mapId); @@ -100,25 +100,25 @@ const PublishDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElemen
- + - + - - + + `} /> - +