restore things lost in bad merge

This commit is contained in:
DD Liu 2017-05-15 16:25:34 -04:00
parent 65d998f473
commit f1208720f6

View file

@ -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])