From b42e6afb26364cb84d07dbf1247be6c14c30d0b9 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 25 Sep 2018 18:19:56 +0200 Subject: [PATCH] try #2270 @1 --- js/libs/fluidbook/fluidbook.resize.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 5364c434..922d40c6 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -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; -- 2.39.5