Ensure CharMeasure exposes integers

This commit is contained in:
Daniel Imms
2017-08-31 23:23:04 -07:00
parent 42e5b3473d
commit 81d93b8fbf
3 changed files with 10 additions and 13 deletions
+4 -5
View File
@@ -32,17 +32,16 @@ export class Renderer {
}
public onResize(cols: number, rows: number): void {
const width = Math.ceil(this._terminal.charMeasure.width) * this._terminal.cols;
const height = Math.ceil(this._terminal.charMeasure.height) * this._terminal.rows;
const width = this._terminal.charMeasure.width * this._terminal.cols;
const height = this._terminal.charMeasure.height * this._terminal.rows;
for (let i = 0; i < this._dataRenderLayers.length; i++) {
this._dataRenderLayers[i].resize(this._terminal, width, height, false);
}
}
public onCharSizeChanged(charWidth: number, charHeight: number): void {
console.log('Renderer.onCharSizeChanged', charWidth, charHeight);
const width = Math.ceil(charWidth) * this._terminal.cols;
const height = Math.ceil(charHeight) * this._terminal.rows;
const width = charWidth * this._terminal.cols;
const height = charHeight * this._terminal.rows;
for (let i = 0; i < this._dataRenderLayers.length; i++) {
this._dataRenderLayers[i].resize(this._terminal, width, height, true);
}