onWindowResize -> onDevicePixelRatioChange

This commit is contained in:
Daniel Imms
2019-05-18 19:27:06 -07:00
parent 5f70b3f3be
commit 24de302d2f
5 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -76,11 +76,11 @@ export class Renderer extends Disposable implements IRenderer {
}
}
public onWindowResize(devicePixelRatio: number): void {
public onDevicePixelRatioChange(): void {
// If the device pixel ratio changed, the char atlas needs to be regenerated
// and the terminal needs to refreshed
if (this._devicePixelRatio !== devicePixelRatio) {
this._devicePixelRatio = devicePixelRatio;
if (this._devicePixelRatio !== window.devicePixelRatio) {
this._devicePixelRatio = window.devicePixelRatio;
this.onResize(this._terminal.cols, this._terminal.rows);
}
}