mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix compile
This commit is contained in:
@@ -4,10 +4,11 @@
|
||||
*/
|
||||
|
||||
import { IOptionsService } from 'common/services/Services';
|
||||
import { IEvent, EventEmitter } from 'common/EventEmitter';
|
||||
import { EventEmitter } from 'common/EventEmitter';
|
||||
import { ICharSizeService } from 'browser/services/Services';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
|
||||
export class CharSizeService implements ICharSizeService {
|
||||
export class CharSizeService extends Disposable implements ICharSizeService {
|
||||
public serviceBrand: undefined;
|
||||
|
||||
public width: number = 0;
|
||||
@@ -24,6 +25,7 @@ export class CharSizeService implements ICharSizeService {
|
||||
parentElement: HTMLElement,
|
||||
@IOptionsService private readonly _optionsService: IOptionsService
|
||||
) {
|
||||
super();
|
||||
this._measureStrategy = new DomMeasureStrategy(document, parentElement, this._optionsService);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,27 +5,28 @@
|
||||
import { IUnicodeService, IUnicodeVersionProvider } from 'common/services/Services';
|
||||
import { EventEmitter, IEvent } from 'common/EventEmitter';
|
||||
import { UnicodeV6 } from 'common/input/UnicodeV6';
|
||||
import { Disposable } from 'common/Lifecycle';
|
||||
|
||||
|
||||
export class UnicodeService extends Disposable implements IUnicodeService {
|
||||
export class UnicodeService implements IUnicodeService {
|
||||
public serviceBrand: any;
|
||||
|
||||
private _providers: {[key: string]: IUnicodeVersionProvider} = Object.create(null);
|
||||
private _active: string = '';
|
||||
private _activeProvider: IUnicodeVersionProvider;
|
||||
|
||||
private readonly _onChange = super.register(new EventEmitter<string>();
|
||||
private readonly _onChange = new EventEmitter<string>();
|
||||
public readonly onChange = this._onChange.event;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const defaultProvider = new UnicodeV6();
|
||||
this.register(defaultProvider);
|
||||
this._active = defaultProvider.version;
|
||||
this._activeProvider = defaultProvider;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._onChange.dispose();
|
||||
}
|
||||
|
||||
public get versions(): string[] {
|
||||
return Object.keys(this._providers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user