mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-08 13:37:55 -05:00
fix merge more
This commit is contained in:
parent
4cfedc8d9d
commit
dcdb806b57
2 changed files with 6 additions and 3 deletions
|
@ -688,7 +688,10 @@ 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 only emit if monitors has changed since last time.
|
||||
this.emit(Runtime.MONITORS_UPDATE,
|
||||
Object.keys(this._monitorState).map(key => this._monitorState[key])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,8 +55,8 @@ class VirtualMachine extends EventEmitter {
|
|||
this.runtime.on(Runtime.TARGETS_UPDATE, () => {
|
||||
this.emitTargetsUpdate();
|
||||
});
|
||||
instance.runtime.on(Runtime.MONITORS_UPDATE, monitorList => {
|
||||
instance.emit(Runtime.MONITORS_UPDATE, monitorList);
|
||||
this.runtime.on(Runtime.MONITORS_UPDATE, monitorList => {
|
||||
this.emit(Runtime.MONITORS_UPDATE, monitorList);
|
||||
});
|
||||
|
||||
this.blockListener = this.blockListener.bind(this);
|
||||
|
|
Loading…
Reference in a new issue