mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
use offsetWidth for measuring
This commit is contained in:
@@ -152,6 +152,6 @@ export class WidthCache implements IDisposable {
|
||||
protected _measure(c: string, variant: FontVariant): number {
|
||||
const el = this._measureElements[variant];
|
||||
el.textContent = c.repeat(WidthCacheSettings.REPEAT);
|
||||
return el.getBoundingClientRect().width / WidthCacheSettings.REPEAT;
|
||||
return el.offsetWidth / WidthCacheSettings.REPEAT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user