mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-02 14:14:41 +00:00
more cleanup
This commit is contained in:
parent
4c52543f98
commit
0b77cb0d27
69
lib/high.js
69
lib/high.js
@ -4,32 +4,32 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
API Example:
|
||||
This will render a box with ascii borders containing the
|
||||
text 'Hello world!', centered horizontally and vertically.
|
||||
var blessed = require('blessed')
|
||||
, program = blessed()
|
||||
, screen;
|
||||
API Example:
|
||||
This will render a box with ascii borders containing the
|
||||
text 'Hello world!', centered horizontally and vertically.
|
||||
var blessed = require('blessed')
|
||||
, program = blessed()
|
||||
, screen;
|
||||
|
||||
screen = new blessed.Screen({
|
||||
program: program
|
||||
});
|
||||
screen = new blessed.Screen({
|
||||
program: program
|
||||
});
|
||||
|
||||
screen.append(new blessed.Text({
|
||||
screen: screen,
|
||||
parent: screen,
|
||||
fg: 3,
|
||||
bg: 5,
|
||||
border: {
|
||||
type: 'ascii',
|
||||
fg: 1
|
||||
},
|
||||
content: 'Hello world!',
|
||||
top: 'center',
|
||||
left: 'center'
|
||||
}));
|
||||
screen.append(new blessed.Text({
|
||||
screen: screen,
|
||||
parent: screen,
|
||||
fg: 3,
|
||||
bg: 5,
|
||||
border: {
|
||||
type: 'ascii',
|
||||
fg: 1
|
||||
},
|
||||
content: 'Hello world!',
|
||||
top: 'center',
|
||||
left: 'center'
|
||||
}));
|
||||
|
||||
screen.render();
|
||||
screen.render();
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -206,19 +206,6 @@ Screen.prototype.draw = function(start, end) {
|
||||
* Element
|
||||
*/
|
||||
|
||||
// Example Borders:
|
||||
// options.border = {
|
||||
// type: 'ascii',
|
||||
// color: 'red',
|
||||
// left: false
|
||||
// };
|
||||
// options.border = {
|
||||
// type: 'bg',
|
||||
// color: 'lightblack',
|
||||
// right: false,
|
||||
// width: 1
|
||||
// };
|
||||
|
||||
function Element(options) {
|
||||
Node.call(this, options);
|
||||
this.screen = options.screen;
|
||||
@ -232,16 +219,6 @@ function Element(options) {
|
||||
height: options.height || null
|
||||
};
|
||||
|
||||
/*
|
||||
if (!this.position.right) {
|
||||
this.position.width = options.width;
|
||||
}
|
||||
|
||||
if (!this.position.bottom) {
|
||||
this.position.height = options.height;
|
||||
}
|
||||
*/
|
||||
|
||||
this.fg = options.fg || 0x1ff;
|
||||
this.bg = options.bg || 0x1ff;
|
||||
this.bold = options.bold ? 1 : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user