mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Terminal eixst
This commit is contained in:
@@ -327,8 +327,8 @@ function createTerminal(): Terminal {
|
||||
}
|
||||
const cols = size.cols;
|
||||
const rows = size.rows;
|
||||
const pixelWidth = Math.round(term.dimensions?.css?.canvas?.width ?? 0);
|
||||
const pixelHeight = Math.round(term.dimensions?.css?.canvas?.height ?? 0);
|
||||
const pixelWidth = Math.round(term!.dimensions?.css?.canvas?.width ?? 0);
|
||||
const pixelHeight = Math.round(term!.dimensions?.css?.canvas?.height ?? 0);
|
||||
const url = '/terminals/' + pid + '/size?cols=' + cols + '&rows=' + rows + '&pixelWidth=' + pixelWidth + '&pixelHeight=' + pixelHeight;
|
||||
|
||||
fetch(url, { method: 'POST' });
|
||||
@@ -380,8 +380,8 @@ function createTerminal(): Terminal {
|
||||
if (useRealTerminal instanceof HTMLInputElement && !useRealTerminal.checked) {
|
||||
runFakeTerminal();
|
||||
} else {
|
||||
const pixelWidth = Math.round(term.dimensions?.css?.canvas?.width ?? 0);
|
||||
const pixelHeight = Math.round(term.dimensions?.css?.canvas?.height ?? 0);
|
||||
const pixelWidth = Math.round(term!.dimensions?.css?.canvas?.width ?? 0);
|
||||
const pixelHeight = Math.round(term!.dimensions?.css?.canvas?.height ?? 0);
|
||||
const res = await fetch('/terminals?cols=' + term!.cols + '&rows=' + term!.rows + '&pixelWidth=' + pixelWidth + '&pixelHeight=' + pixelHeight, { method: 'POST' });
|
||||
const processId = await res.text();
|
||||
pid = processId;
|
||||
|
||||
Reference in New Issue
Block a user