mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Sync DOM decoration styles when line height/width changes
See microsoft/vscode#219979
This commit is contained in:
@@ -108,8 +108,13 @@ export class BufferDecorationRenderer extends Disposable {
|
||||
element!.remove();
|
||||
});
|
||||
}
|
||||
element.style.top = `${line * this._renderService.dimensions.css.cell.height}px`;
|
||||
element.style.display = this._altBufferIsActive ? 'none' : 'block';
|
||||
if (!this._altBufferIsActive) {
|
||||
element.style.width = `${Math.round((decoration.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`;
|
||||
element.style.height = `${(decoration.options.height || 1) * this._renderService.dimensions.css.cell.height}px`;
|
||||
element.style.top = `${line * this._renderService.dimensions.css.cell.height}px`;
|
||||
element.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
|
||||
}
|
||||
decoration.onRenderEmitter.fire(element);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user