update files

This commit is contained in:
nuintun 2015-11-26 23:16:58 +08:00
parent ff5529a1ab
commit 434dc18850
2 changed files with 17 additions and 10 deletions

View File

@ -70,10 +70,10 @@ function createXTerm(name, xtermNode){
clearTimeout(timer);
timer = setTimeout(function (){
xtermNode.innerHTML = screen;
//xtermNode.innerHTML = screen;
scroll(xterm, xtermNode);
}, 0);
}, 10);
}
}
});

View File

@ -5,6 +5,21 @@
'use strict';
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
// In the screen buffer, each 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.
// 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
* @param start