mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix fitting class resetting after picking BG
This commit is contained in:
@@ -482,10 +482,10 @@ function highlightNewBackground(bg) {
|
|||||||
*/
|
*/
|
||||||
function setFittingClass(fitting) {
|
function setFittingClass(fitting) {
|
||||||
const backgrounds = $('#bg1, #bg_custom');
|
const backgrounds = $('#bg1, #bg_custom');
|
||||||
backgrounds.toggleClass('cover', fitting === 'cover');
|
for (const option of ['cover', 'contain', 'stretch', 'center']) {
|
||||||
backgrounds.toggleClass('contain', fitting === 'contain');
|
backgrounds.toggleClass(option, option === fitting);
|
||||||
backgrounds.toggleClass('stretch', fitting === 'stretch');
|
}
|
||||||
backgrounds.toggleClass('center', fitting === 'center');
|
background_settings.fitting = fitting;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onBackgroundFilterInput() {
|
function onBackgroundFilterInput() {
|
||||||
|
Reference in New Issue
Block a user