Fixed fill character

This commit is contained in:
Nathan Byrd 2022-01-19 15:11:33 -06:00
parent c82497b75e
commit c4ed09a8bb
2 changed files with 21 additions and 4 deletions

View file

@ -263,7 +263,7 @@ MenuView.prototype.setItemSpacing = function(itemSpacing) {
};
MenuView.prototype.setItemHorizSpacing = function(itemHorizSpacing) {
itemSpacing = parseInt(itemHorizSpacing);
itemHorizSpacing = parseInt(itemHorizSpacing);
assert(_.isNumber(itemHorizSpacing));
this.itemHorizSpacing = itemHorizSpacing;
@ -280,6 +280,7 @@ MenuView.prototype.setPropertyValue = function(propName, value) {
case 'textOverflow': this.setTextOverflow(value); break;
case 'hotKeySubmit': this.hotKeySubmit = value; break;
case 'justify': this.setJustify(value); break;
case 'fillChar': this.setFillChar(value); break;
case 'focusItemIndex': this.focusedItemIndex = value; break;
case 'itemFormat':
@ -295,6 +296,11 @@ MenuView.prototype.setPropertyValue = function(propName, value) {
MenuView.super_.prototype.setPropertyValue.call(this, propName, value);
};
MenuView.prototype.setFillChar = function(fillChar) {
this.fillChar = miscUtil.valueWithDefault(fillChar, ' ').substr(0, 1);
this.invalidateRenderCache();
}
MenuView.prototype.setJustify = function(justify) {
this.justify = justify;
this.invalidateRenderCache();