Ensure decorations in the top layer render on top of decorations in the bottom layer

This commit is contained in:
Jean Pierre
2023-05-12 16:19:03 -05:00
parent 7a7f4f0add
commit 60f549028f
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -179,8 +179,12 @@
position: absolute;
}
.xterm-screen .xterm-decoration-container .xterm-decoration.top-layer {
z-index: 7;
}
.xterm-decoration-overview-ruler {
z-index: 7;
z-index: 8;
position: absolute;
top: 0;
right: 0;
@@ -72,6 +72,7 @@ export class BufferDecorationRenderer extends Disposable {
private _createElement(decoration: IInternalDecoration): HTMLElement {
const element = document.createElement('div');
element.classList.add('xterm-decoration');
element.classList.toggle('top-layer', decoration?.options?.layer === 'top');
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 = `${(decoration.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height}px`;