mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-07 11:34:05 +08:00
update files
This commit is contained in:
parent
efbd0100b9
commit
10b9f8f8d9
@ -23,6 +23,7 @@ function CanvasXTerm(font){
|
||||
CanvasXTerm.prototype = {
|
||||
draw: function (screen){
|
||||
var text = '';
|
||||
var width, height;
|
||||
var rows = screen.length;
|
||||
var cols = rows ? screen[0].length : 0;
|
||||
var node, i, j, x, y, attrCache, stylesCache;
|
||||
@ -31,14 +32,21 @@ CanvasXTerm.prototype = {
|
||||
this.rows = rows;
|
||||
this.cols = cols;
|
||||
|
||||
this.canvas.width = this.measureWidth(
|
||||
width = this.measureWidth(
|
||||
textRepeat('A', cols),
|
||||
'italic bold ' + this.font.size + 'px ' + this.font.family
|
||||
);
|
||||
|
||||
this.canvas.height = rows * this.font.lineHeight;
|
||||
height = rows * this.font.lineHeight;
|
||||
} else {
|
||||
width = this.canvas.width;
|
||||
height = this.canvas.height;
|
||||
}
|
||||
|
||||
// clear canvas
|
||||
this.canvas.width = width;
|
||||
this.canvas.height = height;
|
||||
|
||||
for (i = 0; i < rows; i++) {
|
||||
x = 0;
|
||||
y = i * this.font.lineHeight + this.baseY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user