fix auto-save.

This commit is contained in:
Paulo Gustavo Veiga 2022-11-23 08:15:38 -08:00
parent 4ca3d03b90
commit d52d4a0e41
3 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,6 @@ class Editor {
// Is the save action enabled ... ?
if (!capability.isHidden('save')) {
// Register unload save ...
window.addEventListener('beforeunload', () => {
this.component.save(false);
this.component.unlockMap();

View File

@ -49,7 +49,7 @@ const TopicNote = (props: {
margin="dense"
value={note}
onChange={(event) => setNote(event.target.value)}
></Input>
/>
<br />
<SaveAndDelete
model={props.noteModel}

View File

@ -80,6 +80,7 @@ const Editor = ({
const mindplotRef = useCallback((component: MindplotWebComponent) => {
const model = new Model(component);
model.registerEvents(setCanvasUpdate, capability);
// Force refresh after map load ...
model