Cleaned up issues with length

This commit is contained in:
Nathan Byrd 2022-01-19 13:07:02 -06:00
parent 4fe55e1e1b
commit d77de9c388
2 changed files with 47 additions and 12 deletions

View file

@ -69,6 +69,15 @@ function MenuView(options) {
util.inherits(MenuView, View);
MenuView.prototype.setTextOverflow = function(overflow) {
this.textOverflow = overflow;
this.invalidateRenderCache();
}
MenuView.prototype.hasTextOverflow = function() {
return this.textOverflow !== undefined;
}
MenuView.prototype.setItems = function(items) {
if (Array.isArray(items)) {
this.sorted = false;
@ -269,6 +278,7 @@ MenuView.prototype.setPropertyValue = function(propName, value) {
case 'items': this.setItems(value); break;
case 'focusItems': this.setFocusItems(value); break;
case 'hotKeys': this.setHotKeys(value); break;
case 'textOverflow': this.setTextOverflow(value); break;
case 'hotKeySubmit': this.hotKeySubmit = value; break;
case 'justify': this.justify = value; break;
case 'focusItemIndex': this.focusedItemIndex = value; break;