Reset DCT options to Color+JPEG when switching from LSB
Some checks failed
Release / test (push) Failing after 34s
Release / publish (push) Has been skipped
Release / github-release (push) Has been skipped

This commit is contained in:
Aaron D. Lee
2026-01-07 19:29:29 -05:00
parent 3f8c2a6957
commit 9c88f53cd0

View File

@@ -691,18 +691,18 @@ const pngFormatInput = document.getElementById('pngFormat');
function updateOutputOptions(mode) { function updateOutputOptions(mode) {
const isLsb = mode === 'lsb'; const isLsb = mode === 'lsb';
// LSB only supports Color + PNG
if (isLsb) { if (isLsb) {
// Force Color and PNG selection // LSB only supports Color + PNG
colorModeInput.checked = true; colorModeInput.checked = true;
pngFormatInput.checked = true; pngFormatInput.checked = true;
// Disable Gray and JPEG
grayModeInput.disabled = true; grayModeInput.disabled = true;
jpegFormatInput.disabled = true; jpegFormatInput.disabled = true;
grayModeLabel?.classList.add('disabled', 'text-muted'); grayModeLabel?.classList.add('disabled', 'text-muted');
jpegFormatLabel?.classList.add('disabled', 'text-muted'); jpegFormatLabel?.classList.add('disabled', 'text-muted');
} else { } else {
// DCT: enable all options // DCT: reset to defaults (Color + JPEG) and enable all
colorModeInput.checked = true;
jpegFormatInput.checked = true;
grayModeInput.disabled = false; grayModeInput.disabled = false;
jpegFormatInput.disabled = false; jpegFormatInput.disabled = false;
grayModeLabel?.classList.remove('disabled', 'text-muted'); grayModeLabel?.classList.remove('disabled', 'text-muted');