small fixes and tweaks

This commit is contained in:
zadam
2021-09-29 12:39:28 +02:00
parent 5358b58191
commit c2d35dac4d
5 changed files with 15 additions and 24 deletions

View File

@@ -70,10 +70,13 @@ function getLinkMap(req) {
function getTreeMap(req) {
const mapRootNote = becca.getNote(req.params.noteId);
// if the map root itself has ignore (journal typically) then there wouldn't be anything to display so
// we'll just ignore it
const ignoreExcludeFromTreeMap = mapRootNote.hasLabel('excludeFromTreeMap');
const noteIds = new Set();
const notes = mapRootNote.getSubtreeNotes(false)
.filter(note => !note.hasLabel('excludeFromTreeMap'))
.filter(note => ignoreExcludeFromTreeMap || !note.hasLabel('excludeFromTreeMap'))
.filter(note => {
if (note.type !== 'image' || note.getChildNotes().length > 0) {
return true;