From: Vincent Vanwaelscappel Date: Fri, 7 Dec 2018 11:39:39 +0000 (+0100) Subject: wip #2412 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e36447711953b01e694babeb6813781208af8867;p=fluidbook-html5.git wip #2412 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.pagetransitions.js b/js/libs/fluidbook/fluidbook.pagetransitions.js index b38a64d7..93dbfacc 100644 --- a/js/libs/fluidbook/fluidbook.pagetransitions.js +++ b/js/libs/fluidbook/fluidbook.pagetransitions.js @@ -41,6 +41,11 @@ FluidbookPageTransition.prototype = { return this.pageTransition2DPortrait(pageNr); } + if(!this.fluidbook.support.transitions3d && this.fluidbook.datas.mobileTransitions === 'flip'){ + this.fluidbook.zoom.resetZoom(); + return this.pageTransition2D(pageNr); + } + if ((!this.fluidbook.support.transitions3d && !this.fluidbook.support.transitions3dacc) || this.fluidbook.datas.mobileTransitions === 'slide') { this.fluidbook.zoom.resetZoom(); return this.pageTransition2D(pageNr); @@ -136,7 +141,7 @@ FluidbookPageTransition.prototype = { res.dir = -1; } - if (this.fluidbook.l10n.dir == 'ltr') { + if (this.fluidbook.l10n.dir === 'ltr') { res.currentLeft = this.fluidbook.currentPage - this.fluidbook.currentPage % 2; res.currentRight = res.currentLeft + 1; if (res.dir == 1) { @@ -155,7 +160,7 @@ FluidbookPageTransition.prototype = { } else { res.currentRight = this.fluidbook.currentPage - this.fluidbook.currentPage % 2; res.currentLeft = res.currentRight + 1; - if (res.dir == 1) { + if (res.dir === 1) { res.currentToClass = 'next'; res.nextFromClass = 'prev'; res.flat = [newPage + 1, res.currentRight]; diff --git a/js/libs/fluidbook/fluidbook.support.js b/js/libs/fluidbook/fluidbook.support.js index 5fa43997..d74287ec 100644 --- a/js/libs/fluidbook/fluidbook.support.js +++ b/js/libs/fluidbook/fluidbook.support.js @@ -40,7 +40,7 @@ function FluidbookSupport(fluidbook) { this.transitionendevent = null; - if (window.resolution == 'auto') { + if (window.resolution === 'auto') { if (Modernizr.mq('(min-device-width : 320px) and (max-device-width : 480px)')) { this.resolution = 150; } else { @@ -86,19 +86,19 @@ FluidbookSupport.prototype = { }; var t = connetion.type; - if (t == undefined) { + if (t === undefined) { t = 'unknown'; - } else if (t == 0) { + } else if (t === 0) { t = 'unknown'; - } else if (t == 1) { + } else if (t === 1) { t = 'ethernet'; - } else if (t == 2) { + } else if (t === 2) { t = 'wifi'; - } else if (t == 3) { + } else if (t === 3) { t = '2g'; - } else if (t == 4) { + } else if (t === 4) { t = '3g'; - } else if (t == 5) { + } else if (t === 5) { t = '4g'; } else { t = 'none'; @@ -163,9 +163,9 @@ FluidbookSupport.prototype = { try { if (this.fluidbook.pad && this.fluidbook.pad.enabled) { return 0; - } else if (this.fluidbook.datas.mobileNavigationType == 'landscape') { + } else if (this.fluidbook.datas.mobileNavigationType === 'landscape') { return 90; - } else if (this.fluidbook.datas.mobileNavigationType == 'portrait') { + } else if (this.fluidbook.datas.mobileNavigationType === 'portrait') { return 0; } } catch (err) {