mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 01:48:32 +02:00
fixes for "add child note" button
This commit is contained in:
parent
5cc91c64a3
commit
ab26216cbe
@ -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 {
|
||||
|
@ -482,13 +482,13 @@ async function createNote(node, parentNoteId, target, isProtected, saveSelection
|
||||
|
||||
await noteDetailService.saveNoteIfChanged();
|
||||
|
||||
noteDetailService.newNoteCreated();
|
||||
|
||||
const noteEntity = new NoteShort(treeCache, note);
|
||||
const branchEntity = new Branch(treeCache, branch);
|
||||
|
||||
treeCache.add(noteEntity, branchEntity);
|
||||
|
||||
noteDetailService.newNoteCreated();
|
||||
|
||||
const newNode = {
|
||||
title: newNoteName,
|
||||
noteId: branchEntity.noteId,
|
||||
|
@ -266,6 +266,8 @@
|
||||
<button id="relation-map-add-child-notes" class="btn" type="button"
|
||||
title="Add all child notes of this relation map note">Add child notes</button>
|
||||
|
||||
|
||||
|
||||
<button id="relation-map-create-child-note" class="btn" type="button"
|
||||
title="Create new child note and add it into this relation map">Create child note</button>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user