]> _ Git - fluidbook-html5.git/commitdiff
fix #3137 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 18 Oct 2019 18:06:21 +0000 (20:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 18 Oct 2019 18:06:21 +0000 (20:06 +0200)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.pagetransitions.js
js/libs/fluidbook/fluidbook.resize.js

index fe73442a0fbe7a4b959b8c4243e91a3332863e4e..c01e4c3455f4548a871340263b076c387e6f6035 100644 (file)
@@ -98,6 +98,7 @@ Fluidbook.prototype = {
         }
         $('html').addClass(this.datas.mobileLVersion);
         this.currentPage = -1;
+        this.currentPageURL = -1;
 
         this.contentlock.init();
 
@@ -458,6 +459,7 @@ Fluidbook.prototype = {
             if (isNaN(page) || page == undefined) {
                 return this.setCurrentPage('1');
             }
+            this.currentPageURL = page;
 
             if (page !== $this.currentPage) {
                 $($this).trigger('fluidbook.page.navigation', [page]);
index ae03c081cbe8b61a5a698cd1649cb2eb3ec49ac3..342dc578352db50f45b108104683f4a58dab1ad2 100644 (file)
@@ -72,7 +72,7 @@ FluidbookPageTransition.prototype = {
 
     },
 
-    pageTransition: function (pageNr) {
+    pageTransition: function (pageNr,transitionType) {
         var $this = this;
         if (this.fluidbook.pad.enabled) {
             this.transitionAxis = this.fluidbook.pad.getTransitionAxis(this.fluidbook.currentPage, page);
@@ -84,7 +84,9 @@ FluidbookPageTransition.prototype = {
 
         this.fluidbook.tooltip.hideTooltip();
         pageNr = this.normalizeTransitionPageNr(pageNr);
-        var transitionType = this.getTransitionType(pageNr);
+        if(transitionType===undefined) {
+            transitionType = this.getTransitionType(pageNr);
+        }
 
         if (this.fluidbook.firstTransition || transitionType === 'immediate') {
             this.fluidbook.firstTransition = false;
index 11276debff4dc85eebd792f7124fb0c186e1f3d0..fe8435626cb5f7e2c9cb2a6006d5cb49c57c8df6 100644 (file)
@@ -441,7 +441,7 @@ FluidbookResize.prototype = {
             $(this.fluidbook).trigger('fluidbook.resize.beforeOrientationChange');
             this.fluidbook.zoom.resetZoom();
             if (!this.fluidbook.firstTransition) {
-                this.fluidbook.pagetransitions.pageTransition();
+                this.fluidbook.pagetransitions.pageTransition(this.fluidbook.currentPageURL, 'immediate');
             }
             $(this.fluidbook).trigger('fluidbook.resize.orientation', {orientation: this.orientation});
             if (this.fluidbook.support.android) {