property inheritance: trigger 'widget-created' after widget manager registration avoid ignoring widgets in resolveProp
This commit is contained in:
parent
f9dc4f3d9d
commit
e874cc7f96
3 changed files with 9 additions and 3 deletions
|
|
@ -82,6 +82,8 @@ var Parser = class Parser {
|
|||
|
||||
widgetContainer[0].setAttribute('data-widget', widgetInner.hash)
|
||||
|
||||
widgetInner.created()
|
||||
|
||||
// dimensions / coordinates can't be < 0
|
||||
for (let t of ['width', 'height', 'top', 'left']) {
|
||||
if (props.hasOwnProperty(t))
|
||||
|
|
|
|||
|
|
@ -81,8 +81,6 @@ module.exports = class _widgets_base {
|
|||
|
||||
}
|
||||
|
||||
$('body').trigger({type: 'widget-created', id: this.getProp('id'), widget:this})
|
||||
|
||||
// cache precision
|
||||
if (this.props.precision != undefined) {
|
||||
this.precision = Math.min(20,Math.max(this.getProp('precision', undefined, false),0))
|
||||
|
|
@ -90,6 +88,12 @@ module.exports = class _widgets_base {
|
|||
|
||||
}
|
||||
|
||||
created() {
|
||||
|
||||
$('body').trigger({type: 'widget-created', id: this.getProp('id'), widget:this})
|
||||
|
||||
}
|
||||
|
||||
sendValue(overrides) {
|
||||
|
||||
var data = {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ module.exports = class Panel extends _widgets_base {
|
|||
}
|
||||
}
|
||||
|
||||
if (edited) $('body').trigger({type: 'widget-created', id: this.getProp('id'), widget:this})
|
||||
if (edited) this.created()
|
||||
|
||||
if (edited && this.parent && this.parent.registerHashes) this.parent.registerHashes(true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue