property inheritance: watch for widgetid creation event even if none found initially in case it gets created after

This commit is contained in:
jean-emmanuel 2018-01-04 09:15:34 +01:00
parent e874cc7f96
commit d753646118

View file

@ -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 {