Add tests for webgl bg colors

This commit is contained in:
Daniel Imms
2019-05-19 15:44:13 -07:00
parent 250683364f
commit 4beea9b704
5 changed files with 150 additions and 15 deletions
+4 -2
View File
@@ -9,14 +9,16 @@ import { WebglRenderer } from './WebglRenderer';
export class WebglRendererAddon implements ITerminalAddon {
private _terminal: Terminal | undefined;
constructor() {}
constructor(
private _preserveDrawingBuffer?: boolean
) {}
public activate(terminal: Terminal): void {
if (!terminal.element) {
throw new Error('Cannot activate WebglRendererAddon before Terminal.open');
}
this._terminal = terminal;
this._terminal.setRenderer(new WebglRenderer(terminal, (terminal as any)._core._colorManager.colors));
this._terminal.setRenderer(new WebglRenderer(terminal, (terminal as any)._core._colorManager.colors, this._preserveDrawingBuffer));
}
public dispose(): void {