Skip to content

Commit 2868c22

Browse files
save map state for undo/redo after new BibEntry nodes are created
1 parent 2197bb4 commit 2868c22

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,11 @@ openSelectedMapBtn.onclick = async function () {
291291
printMapToConsoleBtn.onclick = async function () {
292292
// print mindmap data
293293
console.log(jm.get_data());
294-
// print currently active library
294+
/*// print currently active library
295295
console.log(httpClient.currentLibrary);
296296
// Get preview string for "Tokede_2011" current library (has to be demo to deliver result)
297297
let preview = await httpClient.getPreviewString("Tokede_2011");
298-
console.log(preview);
298+
console.log(preview);*/
299299
}
300300

301301
// undo - discard the last operation (display the previous state)
@@ -395,6 +395,8 @@ addBibEntryAsChildBtn.onclick = async function () {
395395
preview: bibProperties.preview
396396
});
397397
});
398+
// save map state for undo/redo
399+
jm.saveState();
398400
}
399401

400402
addBibEntryAsSiblingBtn.onclick = async function () {
@@ -422,6 +424,8 @@ addBibEntryAsSiblingBtn.onclick = async function () {
422424
preview: bibProperties.preview
423425
});
424426
});
427+
// save map state for undo/redo
428+
jm.saveState();
425429
}
426430

427431
// icon-dropdown menu button handlers

0 commit comments

Comments
 (0)