mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
fix #3683
This commit is contained in:
@@ -15,7 +15,7 @@ import { IBufferService, IDecorationService, IInternalDecoration, IOptionsServic
|
||||
const renderSizes = new Uint16Array(3);
|
||||
const enum SizeIndex {
|
||||
OUTER_SIZE = 0,
|
||||
INNER_SIZE = 0
|
||||
INNER_SIZE = 1
|
||||
}
|
||||
|
||||
export class OverviewRulerRenderer extends Disposable {
|
||||
@@ -91,13 +91,14 @@ export class OverviewRulerRenderer extends Disposable {
|
||||
this._decorationElements.delete(decoration);
|
||||
return;
|
||||
}
|
||||
this._ctx.lineWidth = !decoration.options.overviewRulerOptions.position ? 2 : 6;
|
||||
this._ctx.lineWidth = 1;
|
||||
this._ctx.strokeStyle = decoration.options.overviewRulerOptions.color;
|
||||
this._ctx.strokeRect(
|
||||
this._ctx.fillStyle = decoration.options.overviewRulerOptions.color;
|
||||
this._ctx.fillRect(
|
||||
!decoration.options.overviewRulerOptions.position || decoration.options.overviewRulerOptions.position === 'left' ? 0 : decoration.options.overviewRulerOptions.position === 'right' ? renderSizes[SizeIndex.OUTER_SIZE] + renderSizes[SizeIndex.INNER_SIZE]: renderSizes[SizeIndex.OUTER_SIZE],
|
||||
Math.round(this._canvas.height * (decoration.options.marker.line / this._bufferService.buffers.active.lines.length)),
|
||||
!decoration.options.overviewRulerOptions.position ? this._width : decoration.options.overviewRulerOptions.position === 'center' ? renderSizes[SizeIndex.INNER_SIZE]: renderSizes[SizeIndex.OUTER_SIZE],
|
||||
window.devicePixelRatio
|
||||
!decoration.options.overviewRulerOptions.position ? this._width : decoration.options.overviewRulerOptions.position === 'center' ? renderSizes[SizeIndex.INNER_SIZE] : renderSizes[SizeIndex.OUTER_SIZE],
|
||||
window.devicePixelRatio * (!decoration.options.overviewRulerOptions.position ? 2 : 6)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user