From 249e73cd255ec71c3e6e9ae37149e02910a8ec6b Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Mar 2022 21:35:31 -0600 Subject: [PATCH] delete unused code --- src/browser/services/DecorationService.ts | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/browser/services/DecorationService.ts b/src/browser/services/DecorationService.ts index 33aec4c7..db8aaee2 100644 --- a/src/browser/services/DecorationService.ts +++ b/src/browser/services/DecorationService.ts @@ -101,19 +101,9 @@ export class DecorationService extends Disposable implements IDecorationService this._scrollbarDecorationCanvas = this._scrollbarDecorationNode.getContext('2d'); this._refreshScollbarDecorations(); } - this._scrollbarDecorationCanvas!.lineWidth = 1; - this._scrollbarDecorationCanvas!.strokeStyle = color; - this._scrollbarDecorationCanvas!.strokeRect( - 0, - this._scrollbarDecorationNode.height * (marker.line / this._bufferService.buffers.active.lines.length), - this._scrollbarDecorationNode.width, - window.devicePixelRatio - ); - if (this._scrollbarDecorationNode) { - const scrollbarDecoration = new ScrollbarDecoration({ marker, scrollbarDecorationColor: color }, this._scrollbarDecorationNode, this._scrollbarDecorationCanvas!, this._viewportElement, this._bufferService); - this._scrollDecorations.push(scrollbarDecoration); - return scrollbarDecoration; - } + const scrollbarDecoration = new ScrollbarDecoration({ marker, scrollbarDecorationColor: color }, this._scrollbarDecorationNode, this._scrollbarDecorationCanvas!, this._bufferService); + this._scrollDecorations.push(scrollbarDecoration); + return scrollbarDecoration; } private _refreshBufferDecorations(shouldRecreate?: boolean): void { @@ -161,7 +151,6 @@ export class ScrollbarDecoration extends Disposable implements IDecoration { options: IDecorationOptions, canvas: HTMLCanvasElement, private readonly _ctx: CanvasRenderingContext2D, - private readonly _viewport: HTMLElement, private readonly _bufferService: IBufferService ) { super();