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 ... ? // Is the save action enabled ... ?
if (!capability.isHidden('save')) { if (!capability.isHidden('save')) {
// Register unload save ... // Register unload save ...
window.addEventListener('beforeunload', () => { window.addEventListener('beforeunload', () => {
this.component.save(false); this.component.save(false);
this.component.unlockMap(); this.component.unlockMap();

View File

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

View File

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