mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +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'
|
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();
|
const [x, y] = getFreePosition();
|
||||||
|
|
||||||
mapData.notes.push({ id: note.noteId, x, y });
|
mapData.notes.push({ id: note.noteId, x, y });
|
||||||
|
|
||||||
await createNoteBox(id, title, x, y);
|
await createNoteBox(note.noteId, title, x, y);
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -482,13 +482,13 @@ async function createNote(node, parentNoteId, target, isProtected, saveSelection
|
|||||||
|
|
||||||
await noteDetailService.saveNoteIfChanged();
|
await noteDetailService.saveNoteIfChanged();
|
||||||
|
|
||||||
|
noteDetailService.newNoteCreated();
|
||||||
|
|
||||||
const noteEntity = new NoteShort(treeCache, note);
|
const noteEntity = new NoteShort(treeCache, note);
|
||||||
const branchEntity = new Branch(treeCache, branch);
|
const branchEntity = new Branch(treeCache, branch);
|
||||||
|
|
||||||
treeCache.add(noteEntity, branchEntity);
|
treeCache.add(noteEntity, branchEntity);
|
||||||
|
|
||||||
noteDetailService.newNoteCreated();
|
|
||||||
|
|
||||||
const newNode = {
|
const newNode = {
|
||||||
title: newNoteName,
|
title: newNoteName,
|
||||||
noteId: branchEntity.noteId,
|
noteId: branchEntity.noteId,
|
||||||
|
@ -266,6 +266,8 @@
|
|||||||
<button id="relation-map-add-child-notes" class="btn" type="button"
|
<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>
|
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"
|
<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>
|
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