Skip to content
Permalink
Browse files
CB-11488 (browser) Added a 1 second long fade out to the splash scree…
…n instead of the hard remove from the DOM whenever hide() is called.

Also made a high z-index the default. This could be added from the user's stylesheets but if that only
gets parsed later, there may be flickering between the application UI and the splash screen itself.
  • Loading branch information
petermetz authored and alsorokin committed Jul 11, 2017
1 parent 87d29ad commit bf9607e27f2f74d9a38b3172bd3f1accfdba2c59
Showing 1 changed file with 14 additions and 2 deletions.
@@ -67,6 +67,7 @@ var SplashScreen = {
localSplash = document.createElement("div");
localSplash.style.backgroundColor = bgColor;
localSplash.style.position = "absolute";
localSplash.style["z-index"] = "99999";

localSplashImage = document.createElement("img");
localSplashImage.src = imageSrc;
@@ -81,8 +82,19 @@ var SplashScreen = {
hide: function () {
if(localSplash) {
window.removeEventListener("resize", onResize, false);
document.body.removeChild(localSplash);
localSplash = null;

localSplash.style.opacity = '0';
localSplash.style["-webkit-transition"] = "opacity 1s ease-in-out";
localSplash.style["-moz-transition"] = "opacity 1s ease-in-out";
localSplash.style["-ms-transition"] = "opacity 1s ease-in-out";
localSplash.style["-o-transition"] = "opacity 1s ease-in-out";

window.setTimeout(function () {
document.body.removeChild(localSplash);
localSplash = null;
}, 1000);


}
}
};

0 comments on commit bf9607e

Please sign in to comment.