]> _ Git - fluidbook-html5.git/commitdiff
try #2270 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 25 Sep 2018 16:19:56 +0000 (18:19 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 25 Sep 2018 16:19:56 +0000 (18:19 +0200)
js/libs/fluidbook/fluidbook.resize.js

index 5364c4347b4457387789b77cd0567d5ced3623da..922d40c62d8108045547a7a9a23693d1b2195b11 100644 (file)
@@ -236,12 +236,10 @@ FluidbookResize.prototype = {
 
         this.resizeSplash();
 
-
         if (this.fluidbook.form) {
             try {
                 this.fluidbook.form.resize();
             } catch (e) {
-
             }
         }
 
@@ -339,7 +337,7 @@ FluidbookResize.prototype = {
     },
     handleOrientation: function () {
         var $this = this;
-        var changeOrientation = this.orientation != '';
+
         var o = this.fluidbook.support.getOrientation();
         var newo;
 
@@ -351,7 +349,6 @@ FluidbookResize.prototype = {
             return false;
         }
 
-
         if (o == 0 || o == 180) {
             newo = 'portrait';
             $('body').removeClass('landscape');
@@ -359,6 +356,10 @@ FluidbookResize.prototype = {
             newo = 'landscape';
             $('body').removeClass('portrait');
         }
+
+        console.log(newo);
+
+        var changeOrientation = this.orientation !== newo;
         var force = this.fluidbook.datas.mobileNavigationType != 'book';
         if (!force && this.orientation == newo) {
             return;
@@ -366,11 +367,10 @@ FluidbookResize.prototype = {
         this.orientation = newo;
 
         $('body').addClass(this.orientation);
-
         this.fluidbook.displayOnePage = (this.orientation == 'portrait');
 
         if (changeOrientation) {
-            //console.warn('Orientation change! ' + this.orientation);
+            console.warn('Orientation change! ' + this.orientation);
             $(this.fluidbook).trigger('fluidbook.resize.beforeOrientationChange');
             this.fluidbook.zoom.resetZoom();
             this.fluidbook.pageTransition();
@@ -384,8 +384,6 @@ FluidbookResize.prototype = {
                 }, 2000);
             }
         }
-
-
     },
     getScreenFluidbookWidth: function () {
         return $("#fluidbook").outerWidth() * fluidbook.resize.bookScale;