mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-10 05:24:04 +08:00
update files
This commit is contained in:
parent
8694c71a1b
commit
fd024f01e1
@ -22,8 +22,6 @@ function Terminal(options){
|
|||||||
if (!(this instanceof Terminal)) return new Terminal(options);
|
if (!(this instanceof Terminal)) return new Terminal(options);
|
||||||
|
|
||||||
iterator(Terminal.defaults, function (key, value){
|
iterator(Terminal.defaults, function (key, value){
|
||||||
console.log(key);
|
|
||||||
|
|
||||||
if (options.hasOwnProperty(options)) {
|
if (options.hasOwnProperty(options)) {
|
||||||
this[key] = options[key];
|
this[key] = options[key];
|
||||||
} else {
|
} else {
|
||||||
@ -49,6 +47,8 @@ function Terminal(options){
|
|||||||
|
|
||||||
this.cols = options.cols || Terminal.geometry[0];
|
this.cols = options.cols || Terminal.geometry[0];
|
||||||
this.rows = options.rows || Terminal.geometry[1];
|
this.rows = options.rows || Terminal.geometry[1];
|
||||||
|
this.bgColor = options.bgColor || Terminal.defaultColors.bgColor;
|
||||||
|
this.fgColor = options.bgColor || Terminal.defaultColors.fgColor;
|
||||||
|
|
||||||
this.ybase = 0;
|
this.ybase = 0;
|
||||||
this.ydisp = 0;
|
this.ydisp = 0;
|
||||||
|
@ -50,10 +50,10 @@ module.exports = function (Terminal){
|
|||||||
|
|
||||||
// Default BG/FG
|
// Default BG/FG
|
||||||
Terminal.defaultColors = {
|
Terminal.defaultColors = {
|
||||||
bg: '#000000',
|
bgColor: '#000000',
|
||||||
fg: '#f0f0f0'
|
fgColor: '#f0f0f0'
|
||||||
};
|
};
|
||||||
|
|
||||||
Terminal.colors[256] = Terminal.defaultColors.bg;
|
Terminal.colors[256] = Terminal.defaultColors.bgColor;
|
||||||
Terminal.colors[257] = Terminal.defaultColors.fg;
|
Terminal.colors[257] = Terminal.defaultColors.fgColor;
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,7 @@ module.exports = function (Terminal){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sync default bg/fg colors
|
// sync default bg/fg colors
|
||||||
this.element.style.backgroundColor = Terminal.defaultColors.bg;
|
this.element.style.backgroundColor = this.bgColor;
|
||||||
this.element.style.color = Terminal.defaultColors.fg;
|
this.element.style.color = this.fgColor;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user