From 4a0591f8b043f20ce300efab34dd149b6c454c31 Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 6 Dec 2015 15:31:06 +0200 Subject: [PATCH] Fix background without transition --- public_html/resources/js/Views.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/public_html/resources/js/Views.js b/public_html/resources/js/Views.js index 382f99b..4af1988 100644 --- a/public_html/resources/js/Views.js +++ b/public_html/resources/js/Views.js @@ -15,6 +15,7 @@ function Views(parser) { this.backgroundName = ""; this.backgroundType = ""; this.characters = new Characters(); + this.characters.makeNamesUnknown(); this.characters.makeNamesKnown(); this.useSpriteTransitions = true; @@ -101,14 +102,15 @@ Views.prototype.background = function (type, name, effect) { }); }); - } else { - $('#background2').css('background', background); - $('#background2').css('backgroundSize', 'cover'); + this.pause(animationTime, false); + return; } - } else { - $('#background2').css('background', background); - $('#background2').css('backgroundSize', 'cover'); } + + $('#background1').hide(); + $('#background2').css('background', background); + $('#background2').css('backgroundSize', 'cover'); + $('#background2').show(); this.pause(animationTime, false); };