]> _ Git - fluidbook-html5.git/commitdiff
wip #2412 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 7 Dec 2018 11:39:39 +0000 (12:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 7 Dec 2018 11:39:39 +0000 (12:39 +0100)
js/libs/fluidbook/fluidbook.pagetransitions.js
js/libs/fluidbook/fluidbook.support.js

index b38a64d799cf098f88ed3f16c7fcfecda237b888..93dbfacca438822db1c3289b5017a9ec1f3632d8 100644 (file)
@@ -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];
index 5fa4399770a9329047f65db16d7382fb54744fea..d74287ecdea5d86ea02066c3b69632225a8c5d36 100644 (file)
@@ -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) {