From cbda45ae119e1e1299c97ba6cd36558a88dca5c7 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 6 Jun 2013 08:14:25 -0500 Subject: [PATCH] positioning --- lib/widget.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/widget.js b/lib/widget.js index dfdf67f..4bfefd3 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -511,6 +511,9 @@ Element.prototype.__defineGetter__('left', function() { }); Element.prototype.__defineGetter__('right', function() { + //if (this.options.right == null && this.options.left != null) { + // return this.screen.cols - (this.left + this.width); + //} return (this.parent.right || 0) + this.position.right; }); @@ -532,6 +535,9 @@ Element.prototype.__defineGetter__('top', function() { }); Element.prototype.__defineGetter__('bottom', function() { + //if (this.options.bottom == null && this.options.top != null) { + // return this.screen.rows - (this.top + this.height); + //} return (this.parent.bottom || 0) + this.position.bottom; }); @@ -1003,6 +1009,7 @@ List.prototype.__proto__ = ScrollableBox.prototype; List.prototype.add = function(item) { var self = this; + // TODO: Use box here and get rid of text. var item = new Text({ screen: this.screen, parent: this,