VerticalMenuView 'focusItemAtTop' property, and selection by node ID on WFC

* Add new property to change how focus items are handed in VM
* Select node by node iD (key press) on WFC
This commit is contained in:
Bryan Ashby
2022-06-04 16:32:50 -06:00
parent 3d191a9c6c
commit 0b11e629a6
4 changed files with 50 additions and 13 deletions

View File

@@ -226,6 +226,10 @@ MenuView.prototype.setFocusItemIndex = function(index) {
this.focusedItemIndex = index;
};
MenuView.prototype.getFocusItemIndex = function() {
return this.focusedItemIndex;
};
MenuView.prototype.onKeyPress = function(ch, key) {
const itemIndex = this.getHotKeyItemIndex(ch);
if(itemIndex >= 0) {