mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(terminal) add update
This commit is contained in:
parent
8cc56ca448
commit
886cba56f4
1 changed files with 7 additions and 1 deletions
|
|
@ -97,6 +97,12 @@ var CloudCmd, Util, DOM, CloudFunc, Terminal;
|
|||
Terminal.brokenBold = true;
|
||||
|
||||
Util.exec(callback);
|
||||
}, {
|
||||
onUpdate: function() {
|
||||
var size = getSize();
|
||||
Term.resize(size.cols, size.rows);
|
||||
Term.emit('resize', size);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +129,7 @@ var CloudCmd, Util, DOM, CloudFunc, Terminal;
|
|||
}
|
||||
});
|
||||
|
||||
Term.on(CHANNEL_RESIZE, function() {
|
||||
Term.on('resize', function(size) {
|
||||
socket.emit(CHANNEL_RESIZE, size);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue