remove test

This commit is contained in:
meganrogge
2022-03-15 12:56:34 -04:00
parent 80e7963dbe
commit e7e9d5ca4c
6 changed files with 15 additions and 21 deletions
@@ -106,6 +106,9 @@ export class BufferDecorationRenderer extends Disposable {
private _removeDecoration(decoration: IInternalDecoration): void {
const element = this._decorationElements.get(decoration);
if (element && this._container && this._container.contains(element)) {
this._container.removeChild(element);
}
element?.remove();
this._decorationElements.delete(decoration);
}
@@ -75,12 +75,12 @@ export class OverviewRulerRenderer extends Disposable {
} else {
this._canvas.style.left = decoration.options.x ? `${decoration.options.x * this._renderService.dimensions.actualCellWidth}px` : '';
}
if (!decoration.options.overviewRulerItemColor) {
if (!decoration.options.overviewRulerOptions?.color) {
this._decorationElements.delete(decoration);
return;
}
this._ctx.lineWidth = 1;
this._ctx.strokeStyle = decoration.options.overviewRulerItemColor;
this._ctx.strokeStyle = decoration.options.overviewRulerOptions.color;
this._ctx.strokeRect(
0,
Math.round(this._canvas.height * (decoration.options.marker.line / this._bufferService.buffers.active.lines.length)),