Revert "Merge pull request #4166 from Tyriar/event_with_emitter"

This reverts commit d22f7c9edd, reversing
changes made to 1f8e6f0952.
This commit is contained in:
Daniel Imms
2022-10-06 09:48:54 -07:00
parent 5f1651ffbc
commit 4d97729010
34 changed files with 329 additions and 283 deletions
+4 -3
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { IBufferService, ICoreService, ICoreMouseService } from 'common/services/Services';
import { EventEmitter, IEvent, initEvent } from 'common/EventEmitter';
import { EventEmitter, IEvent } from 'common/EventEmitter';
import { ICoreMouseProtocol, ICoreMouseEvent, CoreMouseEncoding, CoreMouseEventType, CoreMouseButton, CoreMouseAction } from 'common/Types';
/**
@@ -172,7 +172,8 @@ export class CoreMouseService implements ICoreMouseService {
private _activeEncoding: string = '';
private _lastEvent: ICoreMouseEvent | null = null;
public readonly onProtocolChange = initEvent<CoreMouseEventType>();
private readonly _onProtocolChange = new EventEmitter<CoreMouseEventType>();
public readonly onProtocolChange = this._onProtocolChange.event;
constructor(
@IBufferService private readonly _bufferService: IBufferService,
@@ -206,7 +207,7 @@ export class CoreMouseService implements ICoreMouseService {
throw new Error(`unknown protocol "${name}"`);
}
this._activeProtocol = name;
this.onProtocolChange.fire(this._protocols[name].events);
this._onProtocolChange.fire(this._protocols[name].events);
}
public get activeEncoding(): string {