]> _ Git - fluidbook-html5.git/commitdiff
fix #2532 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Jan 2019 15:22:27 +0000 (16:22 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Jan 2019 15:22:27 +0000 (16:22 +0100)
_index.html
js/libs/fluidbook/fluidbook.js
style/fluidbook.less

index 0065c8ed8bce3aebae01328feb281e0d5718604d..4f281629f1dab005392c58ca867aa4126a5ddce1 100644 (file)
@@ -54,7 +54,6 @@
     <div id="interface"></div>
     <div id="helpView"></div>
     <div id="helpViewOverlay"></div>
-
     <div id="z" class="nozoom">
         <div id="center-fluidbook">
             <div id="flip3dcontainer">
 <div id="viewOverlay"></div>
 <div id="view"></div>
 <div id="innerView"></div>
-
 <div id="pagesContents"><!-- $pagesContents --></div>
 <div id="op"></div>
 <div id="ol"></div>
-
-
 <canvas id="pscanvas" width="4096" height="4096"></canvas>
-
 <div id="loader"></div>
 <div id="hiddencontents"><!-- $hiddenContents --></div>
 <div id="splash" style="background-color:#<!-- $bgcolor -->;"><!-- $splash --></div>
index fcd54c0bdb61d5128274e7172508ca1bbc2c508d..5bcd06adbef1c1fc9e5fa3793a5400a81ff2bcd9 100644 (file)
@@ -123,6 +123,7 @@ Fluidbook.prototype = {
     },
 
     initTheme: function () {
+        var $this = this;
         if (this.datas.arrowsTheme) {
             $('html').addClass('sharp');
         }
@@ -132,7 +133,26 @@ Fluidbook.prototype = {
         } else {
             $('html').addClass('menu-default');
         }
+
+        $(document).on('fluidbook.init', function () {
+            console.log('fluidbook init');
+            var logoImg = $("#splash .logo img");
+            if ($(logoImg).isLoaded()) {
+                $this.splashLogoLoaded();
+            } else {
+                $(logoImg).on('load', function () {
+                    $this.splashLogoLoaded();
+                });
+            }
+        });
     },
+
+    splashLogoLoaded: function () {
+        console.log('logo loaded');
+        resize();
+        $("#splash .logo img").css('opacity', 1);
+    },
+
     initLoading: function () {
         if ($("#loader svg").length > 0) {
             return;
index c65e9004c6fb9b82be220660b986696997505443..ef4da1194484399a8647008e23751db56ff55301 100644 (file)
@@ -2386,20 +2386,24 @@ ul.chapters {
 /*  Splash screen */
 #splash {
        position: absolute;
-       top: 0px;
-       left: 0px;
+       top: 0;
+       left: 0;
        z-index: 40;
-}
+       width: 100%;
+       height: 100%;
 
-#splash .logo {
-       position: absolute;
+       .logo {
+               position: absolute;
 
-       // Make sure logo fits and is centred even on small screens
-       img {
-               max-width: 95%;
-               height: auto;
-               display: block;
-               margin: 0 auto;
+               // Make sure logo fits and is centred even on small screens
+               img {
+                       transition: opacity 400ms linear;
+                       max-width: 95%;
+                       height: auto;
+                       display: block;
+                       margin: 0 auto;
+                       opacity: 0;
+               }
        }
 }