fix for use in engine / cli with no api.event
This commit is contained in:
parent
4e8bb6b7ea
commit
336ce53dd3
1 changed files with 4 additions and 1 deletions
|
|
@ -493,7 +493,10 @@ class Widget {
|
|||
}
|
||||
if (x || y || z) {
|
||||
this.setModified();
|
||||
api.event.emit('widget.move', {widget: this, pos});
|
||||
// allow for use in engine / cli
|
||||
if (api && api.event) {
|
||||
api.event.emit('widget.move', {widget: this, pos});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue