feature(terminal) add update

This commit is contained in:
coderaiser 2014-02-04 09:59:05 -05:00
parent 8cc56ca448
commit 886cba56f4

View file

@ -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);
});