mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
fix auto-save.
This commit is contained in:
parent
4ca3d03b90
commit
d52d4a0e41
@ -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();
|
||||||
|
@ -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}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user