drum-machine fix esc key back navigation in selection menus

This commit is contained in:
Trent Palmer 2020-05-27 14:09:00 -07:00
parent fc53c8865c
commit e680fdc2c2
2 changed files with 15 additions and 6 deletions

View File

@ -10,9 +10,8 @@
### TODOS ### TODOS
* increase granularity of esc key function in selection menus back navigation * fix toolstips for menuselectionitems
* add focus() to selectionMenuItems so that you can immediately begin scrolling with arrow keys * add focus() to selectionMenuItems so that you can immediately begin scrolling with arrow keys
* add tip for scrolling selectionMenuItems * add tip for scrolling selectionMenuItems
* make sure metronome continues on volume, sound, or metronome BPM change * make sure metronome continues on volume, sound, or metronome BPM change
* add additional metronome speed values * add additional metronome speed values
* fix toolstips for menuselectionitems

View File

@ -48,8 +48,13 @@ const makeMetronomeSelection = (selection) => {
makeAudioControl(padSelectingFor); makeAudioControl(padSelectingFor);
makeMetronomeIcons(padSelectingFor); makeMetronomeIcons(padSelectingFor);
} else if (selection === '( cancel -- back )') { } else if (selection === '( cancel -- back )') {
if (padSelectingFor === '') {
metronomeMenuDisplayed = false; metronomeMenuDisplayed = false;
$('#display-middle-left-b').html((drumPadGrid)); $('#display-middle-left-b').html((drumPadGrid));
} else {
padSelectingFor = '';
showKeyMetronomeSelectionMenu();
}
} }
}; };
@ -112,8 +117,13 @@ const makeVolumeSelection = (selection) => {
volumeMenuDisplayed = false; volumeMenuDisplayed = false;
$('#display-middle-left-b').html((drumPadGrid)); $('#display-middle-left-b').html((drumPadGrid));
} else if (selection === '( cancel -- back )') { } else if (selection === '( cancel -- back )') {
if (padSelectingFor === '') {
volumeMenuDisplayed = false; volumeMenuDisplayed = false;
$('#display-middle-left-b').html((drumPadGrid)); $('#display-middle-left-b').html((drumPadGrid));
} else {
padSelectingFor = '';
showKeyVolumeSelectionMenu();
}
} }
}; };