onRecoverContext -> onContextLoss
This commit is contained in:
@@ -12,8 +12,8 @@ import { EventEmitter } from 'common/EventEmitter';
|
||||
export class WebglAddon implements ITerminalAddon {
|
||||
private _terminal?: Terminal;
|
||||
private _renderer?: WebglRenderer;
|
||||
private _onRecoverContext = new EventEmitter<void>();
|
||||
public get onRecoverContext(): IEvent<void> { return this._onRecoverContext.event; }
|
||||
private _onContextLoss = new EventEmitter<void>();
|
||||
public get onContextLoss(): IEvent<void> { return this._onContextLoss.event; }
|
||||
|
||||
constructor(
|
||||
private _preserveDrawingBuffer?: boolean
|
||||
@@ -27,7 +27,7 @@ export class WebglAddon implements ITerminalAddon {
|
||||
const renderService: IRenderService = (<any>terminal)._core._renderService;
|
||||
const colors: IColorSet = (<any>terminal)._core._colorManager.colors;
|
||||
this._renderer = new WebglRenderer(terminal, colors, this._preserveDrawingBuffer);
|
||||
this._renderer.onRecoverContext(() => this._onRecoverContext.fire());
|
||||
this._renderer.onContextLoss(() => this._onContextLoss.fire());
|
||||
renderService.setRenderer(this._renderer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user