mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
commit
60e213433b
1 changed files with 15 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import CollapsibleWidget from "../collapsible_widget.js";
|
||||
import treeCache from "../../services/tree_cache.js";
|
||||
|
||||
let linkMapContainerIdCtr = 1;
|
||||
|
||||
|
@ -89,5 +90,19 @@ export default class LinkMapWidget extends CollapsibleWidget {
|
|||
if (loadResults.getAttributes().find(attr => attr.type === 'relation' && (attr.noteId === this.noteId || attr.value === this.noteId))) {
|
||||
this.noteSwitched();
|
||||
}
|
||||
|
||||
const changedNoteIds = loadResults.getNoteIds();
|
||||
|
||||
if (changedNoteIds.length > 0) {
|
||||
const $linkMapContainer = this.$body.find('.link-map-container');
|
||||
|
||||
for (const noteId of changedNoteIds) {
|
||||
const note = treeCache.notes[noteId];
|
||||
|
||||
if (note) {
|
||||
$linkMapContainer.find(`a[data-note-path="${noteId}"]`).text(note.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue