Fix fitting class resetting after picking BG

fd1fdc646665d733bd2179d9439391c3c26ce84d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -4Ignore whitespace
public/scripts/backgrounds.js+4 -4
@@ -482,10 +482,10 @@ function highlightNewBackground(bg) {
482 */482 */
483function setFittingClass(fitting) {483function setFittingClass(fitting) {
484 const backgrounds = $('#bg1, #bg_custom');484 const backgrounds = $('#bg1, #bg_custom');
485 backgrounds.toggleClass('cover', fitting === 'cover');485 for (const option of ['cover', 'contain', 'stretch', 'center']) {
486 backgrounds.toggleClass('contain', fitting === 'contain');486 backgrounds.toggleClass(option, option === fitting);
487 backgrounds.toggleClass('stretch', fitting === 'stretch');487 }
488 backgrounds.toggleClass('center', fitting === 'center');488 background_settings.fitting = fitting;
489}489}
490490
491function onBackgroundFilterInput() {491function onBackgroundFilterInput() {