fixes for "add child note" button

This commit is contained in:
azivner
2018-10-31 18:21:58 +01:00
parent 5cc91c64a3
commit ab26216cbe
3 changed files with 9 additions and 3 deletions

View File

@@ -402,11 +402,15 @@ $createChildNote.click(async () => {
target: 'into'
});
// reloading tree so that the new note appears there
// no need to wait for it to finish
treeService.reload();
const [x, y] = getFreePosition();
mapData.notes.push({ id: note.noteId, x, y });
await createNoteBox(id, title, x, y);
await createNoteBox(note.noteId, title, x, y);
});
export default {