mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-08 04:04:04 +08:00
update files
This commit is contained in:
parent
ff5529a1ab
commit
434dc18850
@ -70,10 +70,10 @@ function createXTerm(name, xtermNode){
|
|||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
|
||||||
timer = setTimeout(function (){
|
timer = setTimeout(function (){
|
||||||
xtermNode.innerHTML = screen;
|
//xtermNode.innerHTML = screen;
|
||||||
|
|
||||||
scroll(xterm, xtermNode);
|
scroll(xterm, xtermNode);
|
||||||
}, 0);
|
}, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -5,6 +5,21 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = function (Terminal){
|
module.exports = function (Terminal){
|
||||||
|
/**
|
||||||
|
* screen
|
||||||
|
* @param foreground
|
||||||
|
* @param background
|
||||||
|
* @param content
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function screen(foreground, background, content){
|
||||||
|
var intro = '<div class="ui-terminal" tabindex="0" spellcheck="false" '
|
||||||
|
+ 'style="outline:none;background-color:' + background + ' ; color:' + foreground + ';">';
|
||||||
|
var outro = '</div>';
|
||||||
|
|
||||||
|
return intro + content + outro;
|
||||||
|
}
|
||||||
|
|
||||||
// Rendering Engine
|
// Rendering Engine
|
||||||
// In the screen buffer, each character
|
// In the screen buffer, each character
|
||||||
// is stored as a an array with a character
|
// is stored as a an array with a character
|
||||||
@ -16,14 +31,6 @@ module.exports = function (Terminal){
|
|||||||
// Next 14 bits: a mask for misc.
|
// Next 14 bits: a mask for misc.
|
||||||
// flags: 1=bold, 2=underline, 4=blink, 8=inverse, 16=invisible
|
// flags: 1=bold, 2=underline, 4=blink, 8=inverse, 16=invisible
|
||||||
|
|
||||||
function screen(foreground, background, content){
|
|
||||||
var intro = '<div class="ui-terminal" tabindex="0" spellcheck="false" '
|
|
||||||
+ 'style="outline:none;background-color:' + background + ' ; color:' + foreground + ';">';
|
|
||||||
var outro = '</div>';
|
|
||||||
|
|
||||||
return intro + content + outro;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refresh
|
* refresh
|
||||||
* @param start
|
* @param start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user