respect dpr/charWidth changes, more accurate base measuring
This commit is contained in:
@@ -233,6 +233,7 @@ export class DomRenderer extends Disposable implements IRenderer {
|
||||
|
||||
public handleDevicePixelRatioChange(): void {
|
||||
this._updateDimensions();
|
||||
this._widthCache.clear();
|
||||
}
|
||||
|
||||
private _refreshRowElements(cols: number, rows: number): void {
|
||||
@@ -255,6 +256,7 @@ export class DomRenderer extends Disposable implements IRenderer {
|
||||
|
||||
public handleCharSizeChanged(): void {
|
||||
this._updateDimensions();
|
||||
this._widthCache.clear();
|
||||
}
|
||||
|
||||
public handleBlur(): void {
|
||||
|
||||
@@ -391,6 +391,11 @@ export class DomRendererRowFactory {
|
||||
}
|
||||
// apply letter-spacing rule
|
||||
if (spacing) {
|
||||
/**
|
||||
* TODO:
|
||||
* - check if we can ignore tiny spacings here (saves ~400ms)
|
||||
* - check if we can apply a global spacing to rows element
|
||||
*/
|
||||
charElement.style.letterSpacing = `${spacing}px`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user