Adopt DI in browser services
This commit is contained in:
@@ -7,6 +7,7 @@ import { IEvent, EventEmitter } from 'common/EventEmitter';
|
||||
import { ICharSizeService, IMouseService } from 'browser/services/Services';
|
||||
|
||||
export class MockCharSizeService implements ICharSizeService {
|
||||
_serviceBrand: any;
|
||||
get hasValidSize(): boolean { return this.width > 0 && this.height > 0; }
|
||||
onCharSizeChange: IEvent<void> = new EventEmitter<void>().event;
|
||||
constructor(public width: number, public height: number) {}
|
||||
@@ -14,6 +15,7 @@ export class MockCharSizeService implements ICharSizeService {
|
||||
}
|
||||
|
||||
export class MockMouseService implements IMouseService {
|
||||
_serviceBrand: any;
|
||||
public getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user