feat: update

parent 3ec6252d
...@@ -22,27 +22,21 @@ export class ElementTermComponent implements OnInit, AfterViewInit { ...@@ -22,27 +22,21 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
ngAfterViewInit() { ngAfterViewInit() {
term.col = Math.floor(jQuery(this.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3; term.col = Math.floor(jQuery(this.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5; term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
// term.term = Terminal({
// cols: term.col,
// rows: term.row,
// useStyle: true,
// screenKeys: true,
// });
term.term.resize(term.col, term.row); term.term.resize(term.col, term.row);
term.term.open(this.el.nativeElement, true); term.term.open(this.el.nativeElement, true);
// const that = this; const that = this;
// window.onresize = function () { window.onresize = function () {
// term.col = Math.floor(jQuery(that.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3; term.col = Math.floor(jQuery(that.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
// term.row = Math.floor(jQuery(that.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5; term.row = Math.floor(jQuery(that.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
//
// if (term.col < 80) { if (term.col < 80) {
// term.col = 80; term.col = 80;
// } }
// if (term.row < 24) { if (term.row < 24) {
// term.row = 24; term.row = 24;
// } }
// term.term.resize(term.col, term.row); term.term.resize(term.col, term.row);
// }; };
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment