@xterm/xterm 6.1.0-beta.154 → 6.1.0-beta.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "6.1.0-beta.154",
4
+ "version": "6.1.0-beta.156",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -117,5 +117,5 @@
117
117
  "ws": "^8.2.3",
118
118
  "xterm-benchmark": "^0.3.1"
119
119
  },
120
- "commit": "f0d291f645dcec053766e86ba52f2d2c8c7707f3"
120
+ "commit": "2f66b5fdb697f7f6549cbd0ab0a291a0fe146156"
121
121
  }
@@ -51,8 +51,6 @@ export class OverviewRulerRenderer extends Disposable {
51
51
  private _shouldUpdateAnchor: boolean | undefined = true;
52
52
  private _lastKnownBufferLength: number = 0;
53
53
 
54
- private _containerHeight: number | undefined;
55
-
56
54
  constructor(
57
55
  private readonly _viewportElement: HTMLElement,
58
56
  private readonly _screenElement: HTMLElement,
@@ -91,13 +89,7 @@ export class OverviewRulerRenderer extends Disposable {
91
89
  }
92
90
  }));
93
91
 
94
- // Container height changed
95
- this._register(this._renderService.onRender((): void => {
96
- if (!this._containerHeight || this._containerHeight !== this._screenElement.clientHeight) {
97
- this._queueRefresh(true);
98
- this._containerHeight = this._screenElement.clientHeight;
99
- }
100
- }));
92
+ this._register(this._renderService.onDimensionsChange(() => this._queueRefresh(true)));
101
93
 
102
94
  this._register(this._coreBrowserService.onDprChange(() => this._queueRefresh(true)));
103
95
  this._register(this._optionsService.onSpecificOptionChange('scrollbar', () => this._queueRefresh(true)));
@@ -144,10 +136,12 @@ export class OverviewRulerRenderer extends Disposable {
144
136
  }
145
137
 
146
138
  private _refreshCanvasDimensions(): void {
139
+ const cssCanvasHeight = this._renderService.dimensions.css.canvas.height;
140
+ const deviceCanvasHeight = this._renderService.dimensions.device.canvas.height;
147
141
  this._canvas.style.width = `${this._width}px`;
148
142
  this._canvas.width = Math.round(this._width * this._coreBrowserService.dpr);
149
- this._canvas.style.height = `${this._screenElement.clientHeight}px`;
150
- this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowserService.dpr);
143
+ this._canvas.style.height = `${cssCanvasHeight}px`;
144
+ this._canvas.height = deviceCanvasHeight;
151
145
  this._refreshDrawConstants();
152
146
  this._refreshColorZonePadding();
153
147
  }
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.154';
9
+ export const XTERM_VERSION = '6.1.0-beta.156';