widgets: move widget instance dom reference storing to constructor
This commit is contained in:
parent
7a544b862d
commit
f675e05d7e
2 changed files with 3 additions and 3 deletions
|
|
@ -101,9 +101,6 @@ var WidgetManager = class WidgetManager {
|
|||
this.scrollingWidgets.push(hash)
|
||||
}
|
||||
|
||||
widget.widget.abstract = widget
|
||||
if (widget.container) widget.container[0].abstract = widget
|
||||
|
||||
ipc.send('addWidget', {
|
||||
hash:hash,
|
||||
data:{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ module.exports = class _widgets_base {
|
|||
this.parentNode = options.parentNode
|
||||
this.hash = _widgets_base.createHash()
|
||||
|
||||
this.widget.abstract = this
|
||||
if (this.container) this.container[0].abstract = this
|
||||
|
||||
// Turn preArgs into array
|
||||
if (this.props.preArgs !== undefined && !Array.isArray(this.resolveProp('preArgs', undefined, false))) {
|
||||
this.props.preArgs = [this.props.preArgs]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue