add tooltip to fancytree node icon, #1120

This commit is contained in:
zadam 2020-06-21 12:47:24 +02:00
parent 2af2b45062
commit e1c2573778

View File

@ -553,6 +553,8 @@ export default class NoteTreeWidget extends TabAwareWidget {
key: utils.randomString(12) // this should prevent some "duplicate key" errors key: utils.randomString(12) // this should prevent some "duplicate key" errors
}; };
node.iconTooltip = node.title;
if (node.folder && node.expanded) { if (node.folder && node.expanded) {
node.children = await this.prepareChildren(note); node.children = await this.prepareChildren(note);
} }
@ -839,6 +841,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
node.icon = this.getIcon(note, isFolder); node.icon = this.getIcon(note, isFolder);
node.extraClasses = this.getExtraClasses(note); node.extraClasses = this.getExtraClasses(note);
node.title = (branch.prefix ? (branch.prefix + " - ") : "") + note.title; node.title = (branch.prefix ? (branch.prefix + " - ") : "") + note.title;
node.iconTooltip = node.title;
if (node.isExpanded() !== branch.isExpanded) { if (node.isExpanded() !== branch.isExpanded) {
node.setExpanded(branch.isExpanded, {noEvents: true}); node.setExpanded(branch.isExpanded, {noEvents: true});