mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-06 19:41:51 -04:00
restore things lost in bad merge
This commit is contained in:
parent
65d998f473
commit
f1208720f6
1 changed files with 9 additions and 1 deletions
|
@ -104,12 +104,18 @@ class Runtime extends EventEmitter {
|
|||
*/
|
||||
this._cloneCounter = 0;
|
||||
|
||||
/**
|
||||
* Flag to emit a targets update at the end of a step. When target data
|
||||
* changes, this flag is set to true.
|
||||
* @type {boolean}
|
||||
*/
|
||||
this._refreshTargets = false;
|
||||
|
||||
/**
|
||||
* List of all monitors.
|
||||
*/
|
||||
this._monitorState = {};
|
||||
|
||||
|
||||
/**
|
||||
* Whether the project is in "turbo mode."
|
||||
* @type {Boolean}
|
||||
|
@ -688,6 +694,8 @@ class Runtime extends EventEmitter {
|
|||
// @todo: Only render when this.redrawRequested or clones rendered.
|
||||
this.renderer.draw();
|
||||
}
|
||||
if (this._refreshTargets) this.emit(Runtime.TARGETS_UPDATE);
|
||||
|
||||
// @todo(vm#570) only emit if monitors has changed since last time.
|
||||
this.emit(Runtime.MONITORS_UPDATE,
|
||||
Object.keys(this._monitorState).map(key => this._monitorState[key])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue