improvements to note tooltip - include (some) notePath and attributes

This commit is contained in:
zadam
2020-09-08 21:45:07 +02:00
parent 8b4cf474bd
commit 0c5f842626
5 changed files with 58 additions and 75 deletions

View File

@@ -205,9 +205,9 @@ export default class AttributeListWidget extends TabAwareWidget {
return 'attribute' + (number === 1 ? '' : 's');
}
renderInheritedAttributes(attributes, $container) {
async renderInheritedAttributes(attributes, $container) {
for (const attribute of attributes) {
const $span = $("<span>")
const $attr = await attributeRenderer.renderAttribute(attribute, false)
.on('click', e => this.attributeDetailWidget.showAttributeDetail({
attribute: {
noteId: attribute.noteId,
@@ -220,10 +220,8 @@ export default class AttributeListWidget extends TabAwareWidget {
y: e.pageY
}));
attributeRenderer.renderAttribute(attribute, $span, false);
$container
.append($span)
.append($attr)
.append(" ");
}
}