Listen to dpr change in a11y manager

This commit is contained in:
Daniel Imms
2018-01-11 09:27:37 -08:00
parent a19b05f813
commit bbc9a010b9
3 changed files with 15 additions and 5 deletions
+4
View File
@@ -66,6 +66,10 @@ export class AccessibilityManager implements IDisposable {
this._addTerminalEventListener('charsizechanged', () => this._refreshRowsDimensions());
this._addTerminalEventListener('key', keyChar => this._onKey(keyChar));
this._addTerminalEventListener('blur', () => this._clearLiveRegion());
// TODO: Maybe renderer should fire an event on terminal when the characters change and that
// should be listened to instead? That would mean that the order of events are always
// guarenteed
this._addTerminalEventListener('dprchange', () => this._refreshRowsDimensions());
// TODO: Dispose of this listener when disposed
// TODO: Listen instead to when devicePixelRatio changed (depends on PR #1172)
window.addEventListener('resize', () => this._refreshRowsDimensions());