Skip to content

Commit

Permalink
html/js: Fix term when resize
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
  • Loading branch information
Jianhui Zhao committed Jun 17, 2018
1 parent 0d53eb2 commit 392db06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions html/src/components/Rtty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ export default {
let ws = new Socket(protocol + location.host + '/ws?devid=' + devid);
this.ws = ws;
window.addEventListener('resize', () => {
if (this.term)
this.term.fit();
});
ws.on('connect', () => {
let term = new Terminal({
cursorBlink: true,
Expand Down

0 comments on commit 392db06

Please sign in to comment.