]> _ Git - fluidbook-html5.git/commitdiff
fix #2433 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 13 Dec 2018 14:38:17 +0000 (15:38 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 13 Dec 2018 14:38:17 +0000 (15:38 +0100)
js/libs/fluidbook/fluidbook.pagetransitions.js
style/fluidbook.less

index 7bf3fe9aa997c952f3bff5d5ce30d0dbdc32b787..1c0a2653f7e910c8d1a1b7181ca4f1e1dddf7127 100644 (file)
@@ -1,6 +1,7 @@
 function FluidbookPageTransition(fluidbook) {
     this.fluidbook = fluidbook;
     this.transitionning = false;
+    this.timeoutAfterTransition = 0;
     this.init();
 }
 
@@ -309,6 +310,7 @@ FluidbookPageTransition.prototype = {
             page: page,
             turningPages: turning.flip
         }]);
+        var $this = this;
         this.fluidbook.tooltip.hideTooltip();
         $(".axis_y").removeClass('axis_y');
         $(".axis_x").removeClass('axis_x');
@@ -319,6 +321,11 @@ FluidbookPageTransition.prototype = {
         this.fluidbook.updateShadows(page, animationDuration);
         this.centerBook(turning.center, animationDuration);
         $("#pagesnumbers").addClass('hidden');
+        this.timeoutAfterTransition = setTimeout(function () {
+            if ($this.transitionning) {
+                $this.afterTransition(page, true);
+            }
+        }, 1000 * (animationDuration + 2))
 
         try {
             this.search.clearHighlights();
@@ -326,7 +333,17 @@ FluidbookPageTransition.prototype = {
 
         }
     },
-    afterTransition: function (page) {
+    afterTransition: function (page, timeout) {
+        if (timeout === undefined) {
+            timeout = false;
+        }
+
+        if (timeout) {
+            console.log('afterTranstion timeout');
+        } else {
+            clearTimeout(this.timeoutAfterTransition);
+        }
+
         var $this = this;
         this.fluidbook.currentPage = page;
         this.fluidbook.setPageNumbers();
index 7a417a71cc566cb21b7bdcb2514e0bf36e272f1f..2edde6a85df80625fc47c183ba351e1a28f609b3 100644 (file)
@@ -334,7 +334,7 @@ body, html {
        overflow: hidden;
        position: absolute;
        top: 0px;
-       background-color: #fff;
+       background-color: transparent;
 
        .texts {
                position: absolute;