mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-11 22:10:00 -04:00
Merge pull request #1815 from paulkaplan/clear-pen-on-dispose
Clear the pen layer when runtime dispose happens.
This commit is contained in:
commit
ff3391718d
3 changed files with 21 additions and 0 deletions
src/engine
|
@ -627,6 +627,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}
|
||||
|
@ -1548,6 +1556,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 *******************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue