|
|
@@ -185,7 +185,7 @@ module.exports = { |
|
|
|
if (config.oldDescription) |
|
|
|
config.description = config.oldDescription; |
|
|
|
|
|
|
|
let event = { |
|
|
|
const event = { |
|
|
|
id: this.nextId++, |
|
|
|
config: extend({}, config), |
|
|
|
eventManager: this, |
|
|
@@ -199,6 +199,10 @@ module.exports = { |
|
|
|
}; |
|
|
|
event.config.event = event; |
|
|
|
|
|
|
|
const onStart = _.getDeepProperty(event, ['config', 'events', 'onStart']); |
|
|
|
if (onStart) |
|
|
|
onStart(this, event); |
|
|
|
|
|
|
|
return event; |
|
|
|
}, |
|
|
|
|
|
|
@@ -305,6 +309,10 @@ module.exports = { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
const onStop = _.getDeepProperty(event, ['config', 'events', 'onStop']); |
|
|
|
if (onStop) |
|
|
|
onStop(this, event); |
|
|
|
|
|
|
|
delete config.event; |
|
|
|
}, |
|
|
|
|
|
|
|