Remove old dimension properties

This commit is contained in:
Daniel Imms
2022-10-15 18:07:05 -07:00
parent 171ba446bd
commit 22e8a2f8e7
21 changed files with 64 additions and 113 deletions
+4 -4
View File
@@ -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)
};
}
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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', () => {