resize when socket is open
This commit is contained in:
parent
2dcf21d62e
commit
7c9e9ea3ac
@ -47,7 +47,6 @@ function TerminalComponent (p: {websocket: string|null}) {
|
|||||||
|
|
||||||
const socket = new WebSocket(websocket);
|
const socket = new WebSocket(websocket);
|
||||||
|
|
||||||
socket.send(JSON.stringify({CommandType: 'resize', Arguments: [terminal.current.cols, terminal.current.rows]}))
|
|
||||||
|
|
||||||
terminal.current.onResize(
|
terminal.current.onResize(
|
||||||
({cols, rows}, _)=>{
|
({cols, rows}, _)=>{
|
||||||
@ -56,6 +55,7 @@ function TerminalComponent (p: {websocket: string|null}) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
socket.addEventListener('open', () => {
|
socket.addEventListener('open', () => {
|
||||||
|
socket.send(JSON.stringify({CommandType: 'resize', Arguments: [terminal.current?.cols, terminal.current?.rows]}))
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.addEventListener('message', (event) => {
|
socket.addEventListener('message', (event) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user