diff --git a/drum-machine/README.md b/drum-machine/README.md index 15fd777..f95dbde 100644 --- a/drum-machine/README.md +++ b/drum-machine/README.md @@ -10,9 +10,8 @@ ### 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 tip for scrolling selectionMenuItems * make sure metronome continues on volume, sound, or metronome BPM change * add additional metronome speed values -* fix toolstips for menuselectionitems diff --git a/drum-machine/makeSelection.js b/drum-machine/makeSelection.js index 77d248a..a502300 100644 --- a/drum-machine/makeSelection.js +++ b/drum-machine/makeSelection.js @@ -48,8 +48,13 @@ const makeMetronomeSelection = (selection) => { makeAudioControl(padSelectingFor); makeMetronomeIcons(padSelectingFor); } else if (selection === '( cancel -- back )') { - metronomeMenuDisplayed = false; - $('#display-middle-left-b').html((drumPadGrid)); + if (padSelectingFor === '') { + metronomeMenuDisplayed = false; + $('#display-middle-left-b').html((drumPadGrid)); + } else { + padSelectingFor = ''; + showKeyMetronomeSelectionMenu(); + } } }; @@ -112,8 +117,13 @@ const makeVolumeSelection = (selection) => { volumeMenuDisplayed = false; $('#display-middle-left-b').html((drumPadGrid)); } else if (selection === '( cancel -- back )') { - volumeMenuDisplayed = false; - $('#display-middle-left-b').html((drumPadGrid)); + if (padSelectingFor === '') { + volumeMenuDisplayed = false; + $('#display-middle-left-b').html((drumPadGrid)); + } else { + padSelectingFor = ''; + showKeyVolumeSelectionMenu(); + } } };