* Did add a tweak to the concept for height only: autoAdjustHeight can be used where it makes sense

* See also: #159
This commit is contained in:
Bryan Ashby 2018-06-23 20:16:44 -06:00
parent 6d4b8abc9c
commit 611a52e946
4 changed files with 29 additions and 105 deletions

View file

@ -31,17 +31,6 @@ function HorizontalMenuView(options) {
return new Array(self.itemSpacing + 1).join(' ');
};
this.performAutoScale = function() {
if(self.autoScale.width) {
var spacer = self.getSpacer();
var width = self.items.join(spacer).length + (spacer.length * 2);
assert(width <= self.client.term.termWidth - self.position.col);
self.dimens.width = width;
}
};
this.performAutoScale();
this.cachePositions = function() {
if(this.positionCacheExpired) {
var col = self.position.col;