From 0b77cb0d2773a35024d7837fc8ebb23356e01e46 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 31 May 2013 21:40:04 -0500 Subject: [PATCH] more cleanup --- lib/high.js | 69 ++++++++++++++++++----------------------------------- 1 file changed, 23 insertions(+), 46 deletions(-) diff --git a/lib/high.js b/lib/high.js index c7fc03b..19214c2 100644 --- a/lib/high.js +++ b/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;