rename css, fix background color getting applied
This commit is contained in:
+1
-1
@@ -179,7 +179,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xterm-decoration-scrollbar {
|
.xterm-decoration-overview-ruler {
|
||||||
z-index: 7;
|
z-index: 7;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
+3
-1
@@ -548,7 +548,9 @@ function addDecoration() {
|
|||||||
const marker = term.addMarker(1);
|
const marker = term.addMarker(1);
|
||||||
const decoration = term.registerDecoration({ marker });
|
const decoration = term.registerDecoration({ marker });
|
||||||
decoration.onRender((e) => {
|
decoration.onRender((e) => {
|
||||||
e.style.backgroundColor = 'red';
|
if (e.classList.value === 'xterm-decoration') {
|
||||||
|
e.style.backgroundColor = 'red';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class OverviewRulerRenderer extends Disposable {
|
|||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this._canvas = document.createElement('canvas');
|
this._canvas = document.createElement('canvas');
|
||||||
this._canvas.classList.add('xterm-decoration-scrollbar');
|
this._canvas.classList.add('xterm-decoration-overview-ruler');
|
||||||
this._viewportElement.parentElement?.insertBefore(this._canvas, this._viewportElement);
|
this._viewportElement.parentElement?.insertBefore(this._canvas, this._viewportElement);
|
||||||
this._ctx = this._canvas.getContext('2d');
|
this._ctx = this._canvas.getContext('2d');
|
||||||
this._canvas.style.width = `${this._optionsService.options.overviewRulerWidth || ScrollbarConstants.WIDTH}px`;
|
this._canvas.style.width = `${this._optionsService.options.overviewRulerWidth || ScrollbarConstants.WIDTH}px`;
|
||||||
|
|||||||
Reference in New Issue
Block a user