You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by al...@apache.org on 2017/07/11 08:57:30 UTC

[3/6] cordova-plugin-splashscreen git commit: CB-11488 (browser) Added a 1 second long fade out to the splash screen 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 use

CB-11488 (browser) Added a 1 second long fade out to the splash screen 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.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/bf9607e2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/bf9607e2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/bf9607e2

Branch: refs/heads/master
Commit: bf9607e27f2f74d9a38b3172bd3f1accfdba2c59
Parents: 87d29ad
Author: Peter (Somogyvari) Metz <pe...@unarin.com>
Authored: Sun Jun 26 11:49:08 2016 +0100
Committer: Alexander Sorokin <al...@akvelon.com>
Committed: Tue Jul 11 10:55:18 2017 +0300

----------------------------------------------------------------------
 src/browser/SplashScreenProxy.js | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/bf9607e2/src/browser/SplashScreenProxy.js
----------------------------------------------------------------------
diff --git a/src/browser/SplashScreenProxy.js b/src/browser/SplashScreenProxy.js
index ae38b2e..cd3b7fd 100644
--- a/src/browser/SplashScreenProxy.js
+++ b/src/browser/SplashScreenProxy.js
@@ -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);
+
+
         }
     }
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org