Clear the pen layer when runtime dispose happens.

This commit is contained in:
Paul Kaplan 2018-12-04 16:43:31 -05:00
parent 122443a75f
commit 6bd2307c99
3 changed files with 21 additions and 0 deletions
src/engine

View file

@ -626,6 +626,14 @@ class Runtime extends EventEmitter {
return 'RUNTIME_STARTED';
}
/**
* Event name when the runtime dispose has been called.
* @const {string}
*/
static get RUNTIME_DISPOSED () {
return 'RUNTIME_DISPOSED';
}
/**
* Event name for reporting that a block was updated and needs to be rerendered.
* @const {string}
@ -1547,6 +1555,7 @@ class Runtime extends EventEmitter {
this.stopAll();
this.targets.map(this.disposeTarget, this);
this._monitorState = OrderedMap({});
this.emit(Runtime.RUNTIME_DISPOSED);
// @todo clear out extensions? turboMode? etc.
// *********** Cloud *******************