update setButtonState

This commit is contained in:
Andrew Bauer 2020-12-23 12:20:31 -06:00
parent f64f3262ed
commit a94550795b
1 changed files with 4 additions and 4 deletions

View File

@ -599,11 +599,11 @@ function scaleToFit(baseWidth, baseHeight, scaleEl, bottomEl) {
return {width: Math.floor(newWidth), height: Math.floor(newHeight), autoScale: autoScale}; return {width: Math.floor(newWidth), height: Math.floor(newHeight), autoScale: autoScale};
} }
function setButtonState(element_id, butClass) { function setButtonState(element_id, btnClass) {
var element = $(element_id); var element = document.getElementById(element_id);
if ( element ) { if ( element ) {
element.className = butClass; element.className = btnClass;
if (butClass == 'unavail' || (butClass == 'active' && (element.id == 'pauseBtn' || element.id == 'playBtn'))) { if (btnClass == 'unavail' || (btnClass == 'active' && (element.id == 'pauseBtn' || element.id == 'playBtn'))) {
element.disabled = true; element.disabled = true;
} else { } else {
element.disabled = false; element.disabled = false;