]> _ Git - fluidbook-html5.git/commitdiff
fix #2310 @4
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 25 Oct 2018 14:13:30 +0000 (16:13 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 25 Oct 2018 14:13:30 +0000 (16:13 +0200)
js/libs/fluidbook/fluidbook.loader.js
js/libs/fluidbook/fluidbook.pagetransitions.js
js/libs/fluidbook/fluidbook.resize.js

index 6a5ffdb8de307b1d6c27ea4fa2bdf489e47fb14d..75e0955caf17ba8bfa346a52106bb7326a8ae1b3 100644 (file)
@@ -131,7 +131,6 @@ FluidbookLoader.prototype = {
         });
     },
 
-
     preloadAround: function (page) {
         if (this.numPreload == 0) {
             this.cleanPreloaded();
index 47d5ffcb538f0ffdd929c4a9b091d85e6f387012..09a37c63053c011ca51306745fe55727761f2437 100644 (file)
@@ -11,7 +11,6 @@ FluidbookPageTransition.prototype = {
     },
 
     pageTransition: function (pageNr) {
-
         if (this.fluidbook.pad.enabled) {
             this.transitionAxis = this.fluidbook.pad.getTransitionAxis(this.fluidbook.currentPage, page);
         } else {
@@ -29,7 +28,8 @@ FluidbookPageTransition.prototype = {
             }
         }
         pageNr = this.fluidbook.normalizePage(pageNr);
-        if (pageNr == this.fluidbook.normalizePage(this.fluidbook.currentPage) || this.fluidbook.currentPage == -1 || !this.fluidbook.support.transitions2d || this.fluidbook.datas.mobileTransitions == 'none') {
+        if (this.fluidbook.firstTransition || pageNr == this.fluidbook.normalizePage(this.fluidbook.currentPage) || this.fluidbook.currentPage == -1 || !this.fluidbook.support.transitions2d || this.fluidbook.datas.mobileTransitions == 'none') {
+            this.fluidbook.firstTransition = false;
             return this.pageTransition1D(pageNr);
         }
 
@@ -282,7 +282,11 @@ FluidbookPageTransition.prototype = {
         if (d == undefined) {
             d = 1;
         }
-        $(this.fluidbook).trigger('fluidbook.page.change.start', [page, {transition: d, page: page, turningPages: turning.flip}]);
+        $(this.fluidbook).trigger('fluidbook.page.change.start', [page, {
+            transition: d,
+            page: page,
+            turningPages: turning.flip
+        }]);
         this.fluidbook.tooltip.hideTooltip();
         $(".axis_y").removeClass('axis_y');
         $(".axis_x").removeClass('axis_x');
index 2b989f21eb6d2791104d9b4d05acc789d195d03e..ee6eabf071fbefe3d71bda9cf6789f226305d877 100644 (file)
@@ -376,8 +376,8 @@ FluidbookResize.prototype = {
         if (changeOrientation) {
             $(this.fluidbook).trigger('fluidbook.resize.beforeOrientationChange');
             this.fluidbook.zoom.resetZoom();
-            if(!this.fluidbook.firstTransition) {
-                this.fluidbook.pageTransition();
+            if (!this.fluidbook.firstTransition) {
+                this.fluidbook.pagetransitions.pageTransition();
             }
             $(this.fluidbook).trigger('fluidbook.resize.orientation', {orientation: this.orientation});
             if (this.fluidbook.support.android) {