jsdoc @param => @type

This commit is contained in:
zadam
2021-10-29 21:37:12 +02:00
parent 9ce224d4c5
commit da74272f13
9 changed files with 76 additions and 68 deletions

View File

@@ -33,6 +33,7 @@ export default class InheritedAttributesWidget extends NoteContextAwareWidget {
constructor() {
super();
/** @type {AttributeDetailWidget} */
this.attributeDetailWidget = new AttributeDetailWidget().setParent(this);
this.child(this.attributeDetailWidget);
}
@@ -65,18 +66,21 @@ export default class InheritedAttributesWidget extends NoteContextAwareWidget {
for (const attribute of inheritedAttributes) {
const $attr = (await attributeRenderer.renderAttribute(attribute, false))
.on('click', e => this.attributeDetailWidget.showAttributeDetail({
attribute: {
noteId: attribute.noteId,
type: attribute.type,
name: attribute.name,
value: attribute.value,
isInheritable: attribute.isInheritable
},
isOwned: false,
x: e.pageX,
y: e.pageY
}));
.on('click', e => {
setTimeout(() =>
this.attributeDetailWidget.showAttributeDetail({
attribute: {
noteId: attribute.noteId,
type: attribute.type,
name: attribute.name,
value: attribute.value,
isInheritable: attribute.isInheritable
},
isOwned: false,
x: e.pageX,
y: e.pageY
}), 100);
});
this.$container
.append($attr)