mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Remove old dimension properties
This commit is contained in:
@@ -601,9 +601,9 @@ async function getCursor(): Promise<{ col: number, row: number }> {
|
||||
async function getDimensions(): Promise<any> {
|
||||
const dim: IRenderDimensions = await page.evaluate(`term._core._renderService.dimensions`);
|
||||
return {
|
||||
cellWidth: dim.actualCellWidth.toFixed(0),
|
||||
cellHeight: dim.actualCellHeight.toFixed(0),
|
||||
width: dim.canvasWidth.toFixed(0),
|
||||
height: dim.canvasHeight.toFixed(0)
|
||||
cellWidth: dim.css.cell.width.toFixed(0),
|
||||
cellHeight: dim.css.cell.height.toFixed(0),
|
||||
width: dim.css.canvas.width.toFixed(0),
|
||||
height: dim.css.canvas.height.toFixed(0)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ async function cellPos(col: number, row: number): Promise<number[]> {
|
||||
(function() {
|
||||
const rect = window.term.element.getBoundingClientRect();
|
||||
const dim = term._core._renderService.dimensions;
|
||||
return {left: rect.left, top: rect.top, bottom: rect.bottom, right: rect.right, width: dim.actualCellWidth, height: dim.actualCellHeight};
|
||||
return {left: rect.left, top: rect.top, bottom: rect.bottom, right: rect.right, width: dim.css.cell.width, height: dim.css.cell.height};
|
||||
})();
|
||||
`);
|
||||
return [col * coords.width + coords.left + 2, row * coords.height + coords.top + 2];
|
||||
|
||||
@@ -721,7 +721,7 @@ describe('API Integration Tests', function(): void {
|
||||
await page.evaluate(`window.term = new Terminal()`);
|
||||
await page.evaluate(`window.term.open(document.querySelector('#terminal-container'))`);
|
||||
await page.evaluate(`document.querySelector('#terminal-container').style.display=''`);
|
||||
await pollFor(page, `window.term._core._renderService.dimensions.actualCellWidth > 0`, true);
|
||||
await pollFor(page, `window.term._core._renderService.dimensions.css.cell.width > 0`, true);
|
||||
});
|
||||
|
||||
describe('registerDecoration', () => {
|
||||
|
||||
Reference in New Issue
Block a user