Reset DCT options to Color+JPEG when switching from LSB
This commit is contained in:
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user