| 482 | 482 | */ |
| 483 | 483 | function setFittingClass(fitting) { |
| 484 | 484 | const backgrounds = $('#bg1, #bg_custom'); |
| 485 | | - backgrounds.toggleClass('cover', fitting === 'cover'); |
| 485 | + for (const option of ['cover', 'contain', 'stretch', 'center']) { |
| 486 | 486 | backgrounds.toggleClass('contain'option, fittingoption === 'contain'fitting); |
| 487 | | - backgrounds.toggleClass('stretch', fitting === 'stretch'); |
| 487 | + } |
| 488 | | - backgrounds.toggleClass('center', fitting === 'center'); |
| 488 | + background_settings.fitting = fitting; |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | function onBackgroundFilterInput() { |