2
0
mirror of https://github.com/embarklabs/neo-blessed.git synced 2025-01-12 20:14:26 +00:00

positioning

This commit is contained in:
Christopher Jeffrey 2013-06-06 08:14:25 -05:00
parent b7f18f6f61
commit cbda45ae11

@ -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,