]> _ Git - fluidbook-html5.git/commitdiff
wip #3639 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 18 May 2020 17:23:07 +0000 (19:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 18 May 2020 17:23:07 +0000 (19:23 +0200)
js/libs/fluidbook/fluidbook.splash.js

index 264f53961d08f421bdbd9b8b6de2b67964b610f6..722de533adbdbef7e1c88e700f3b8cae80ff3104 100644 (file)
@@ -9,12 +9,17 @@ FluidbookSplash.prototype = {
         this.waitForTimer = true;
         this.waitForReady = true;
 
+        var min = parseFloat(this.fluidbook.settings.splashMinimalTime);
+        if (min < 5 || isNaN(min)) {
+            min = 5;
+        }
+
         var $this = this;
         this.initTime = Date.now();
         setTimeout(function () {
             $this.waitForTimer = false;
             $this.hideIfPossible();
-        }, parseFloat(this.fluidbook.settings.splashMinimalTime) * 1000);
+        }, min * 1000);
 
     },
 
@@ -37,7 +42,7 @@ FluidbookSplash.prototype = {
                 this.fluidbook.pagetransitions.flip3d.performancesTest(function () {
                     $this.fluidbook.networkControl.resume();
                     var timeout = $this.hideSplashTimeout;
-                    if (window.SCORM !== undefined && window.SCORM===true) {
+                    if (window.SCORM !== undefined && window.SCORM === true) {
                         timeout += 5;
                     }
                     setTimeout(function () {