property inheritance: watch for widgetid creation event even if none found initially in case it gets created after
This commit is contained in:
parent
e874cc7f96
commit
d753646118
1 changed files with 20 additions and 17 deletions
|
|
@ -175,30 +175,31 @@ module.exports = class _widgets_base {
|
|||
}
|
||||
}
|
||||
|
||||
if (id != 'this' && id != 'parent' && storeLinks) {
|
||||
|
||||
if (k == '_value') {
|
||||
|
||||
if (!this.linkedPropsValue[id]) this.linkedPropsValue[id] = []
|
||||
this.linkedPropsValue[id].push(propName)
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
if (!this.linkedProps[id]) this.linkedProps[id] = []
|
||||
this.linkedProps[id].push(propName)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (var i in widgets) {
|
||||
|
||||
if (widgets[i].props.hasOwnProperty(k) || k == '_value') {
|
||||
|
||||
if (originalPropName == k && widgets[i].props.id == originalWidget.props.id) {
|
||||
throw `Circular property reference for ${originalWidget.props.id}.${originalPropName}`
|
||||
}
|
||||
|
||||
if (id != 'this' && id != 'parent' && storeLinks) {
|
||||
|
||||
if (k == '_value') {
|
||||
|
||||
if (!this.linkedPropsValue[id]) this.linkedPropsValue[id] = []
|
||||
this.linkedPropsValue[id].push(propName)
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
if (!this.linkedProps[id]) this.linkedProps[id] = []
|
||||
this.linkedProps[id].push(propName)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var r = k == '_value' ?
|
||||
widgets[i].getValue(true) :
|
||||
widgets[i].resolveProp(k, undefined, storeLinks, originalWidget, originalPropName)
|
||||
|
|
@ -209,7 +210,9 @@ module.exports = class _widgets_base {
|
|||
return r
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue