]> _ Git - fluidbook-html5.git/commitdiff
wip #809 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Jul 2018 17:50:48 +0000 (19:50 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Jul 2018 17:50:48 +0000 (19:50 +0200)
js/libs/fluidbook/fluidbook.pagetransitions.js

index 6e103bed65289fc770b848e4af96d9c5775d3885..774f004d542481749418617557f11ce3e2f58125 100644 (file)
@@ -97,11 +97,21 @@ FluidbookPageTransition.prototype = {
         if (!this.fluidbook.loader.arePreloadedPages(turning.end)) {
             this.fluidbook.displayLoader();
         }
+        var currentDoublePage = $("#currentDoublePage");
+        var doublePage = $("#nextDoublePage");
 
         this.fluidbook.loader.preloadPagesBeforeTransition(turning.end, function () {
-            $this.beforeTransition(pageNr, 3, turning);
-            $this.flip3d.playTurn(turning, function () {
-                $this.afterTransition(pageNr);
+            $this.fluidbook.loader.setContentsInDoublePage(currentDoublePage, turning.flat, true, function () {
+                $this.fluidbook.loader.setContentsInDoublePage(doublePage, turning.flip, true, function () {
+                    $this.beforeTransition(pageNr, 3, turning);
+                    $this.flip3d.playTurn(turning, function () {
+                        $this.fluidbook.loader.setContentsInDoublePage(doublePage, turning.end, false, function () {
+                            $("#currentDoublePage").remove();
+                            $(doublePage).attr('id', 'currentDoublePage');
+                            $this.afterTransition(pageNr);
+                        });
+                    });
+                });
             });
         });
     },