]> _ Git - fluidbook-html5.git/commitdiff
fix #1374 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 May 2017 18:01:40 +0000 (20:01 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 3 May 2017 18:01:40 +0000 (20:01 +0200)
_index.html
js/libs/fluidbook/fluidbook.nav.js
js/libs/fluidbook/fluidbook.resize.js
js/main.js

index ba0555e0a768e661044761eeaeeb0b95e309f35f..ff0481a87abd17d26fedc210fd6e22c6206ba981 100644 (file)
@@ -10,7 +10,7 @@
        <meta http-equiv="Content-Security-Policy"
              content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com; img-src * data:">
        <!--<meta name="apple-mobile-web-app-capable" content="yes">-->
-       <meta name="viewport" content="initial-scale=1,minimum-scale=1">
+       <meta name="viewport" content="initial-scale=1,minimum-scale=1,user-scalable=no">
        <meta name="google" content="notranslate">
        <!-- $description -->
        <!-- $style -->
@@ -18,7 +18,7 @@
        <!-- $ga -->
        <!-- $favicon -->
 </head>
-<body style="background-color:#<!-- $bgcolor -->;" data-branch="mobilezoom">
+<body style="background-color:#<!-- $bgcolor -->;" data-branch="master">
 <!--googleoff: all-->
 <!-- $svg -->
 <div id="message"><!-- $message --></div>
index 69e0972b55d10945386db44f58aac7839e24b98d..80adbb7a66dd67d8a2d134f3c6964336031a5306 100644 (file)
@@ -251,7 +251,7 @@ FluidbookNav.prototype = {
         var res = this.getLink('interface-previous', '#', 'previous', '', '', false);
         res += this.getLink('interface-next', '#', 'next', '', '', false);
         $('#interface').append(res);
-        $(document).on('touchstart click', '#next', goNextPage);
-        $(document).on('touchstart click', '#previous', goPreviousPage);
+        $(document).on('click', '#next', goNextPage);
+        $(document).on('click', '#previous', goPreviousPage);
     }
 };
\ No newline at end of file
index 49468ff943a7ff64fee74473bc5e8512db7402a4..ffbc0c5b766dcaa6fc3e599aebfbaf99bc5e38b8 100644 (file)
@@ -73,13 +73,6 @@ FluidbookResize.prototype = {
             interfaceScale = Math.min(1, this.ww / refWidth, this.hh / this.referenceHeight);
         }
 
-        if (this.fluidbook.support.android) {
-            // Enable double tap zoom for android
-            this.fluidbook.viewport.width = this.ww + 1;
-            this.fluidbook.viewport.updateViewport();
-        }
-
-
         var navScale = interfaceScale * parseInt(this.fluidbook.datas.mobileNavScale) / 100;
         var cssInterfaceScale = [interfaceScale, interfaceScale];
         var cssNavScale = [navScale, navScale];
@@ -381,6 +374,7 @@ FluidbookResize.prototype = {
         });
     },
     handleOrientation: function () {
+        var $this = this;
         var changeOrientation = this.orientation != '';
         var o = this.fluidbook.support.getOrientation();
         var newo;
index 0f3f250d76a282cbc1860a59792bb40bf8b9c2fd..4ce48657863c73708f89aaa2c8c7eda104fb96dd 100644 (file)
@@ -492,14 +492,7 @@ function goNextPage(e) {
         return;
     }
 
-    if (e.originalEvent.touches != undefined && e.originalEvent.touches.length > 0) {
-        var o = $("#next").offset();
-        y = e.originalEvent.touches[0].pageY - o.top;
-    } else {
-        y = e.offsetY == undefined ? e.originalEvent.layerY : e.offsetY;
-    }
-
-
+    var y = e.offsetY == undefined ? e.originalEvent.layerY : e.offsetY;
     if (y < 65) {
         if (fluidbook.pad.enabled) {
             fluidbook.goNextChapter();
@@ -516,14 +509,9 @@ function goPreviousPage(e) {
     if (fluidbook.help.isVisible()) {
         return;
     }
-    var y;
 
-    if (e.originalEvent.touches != undefined && e.originalEvent.touches.length > 0) {
-        var o = $("#previous").offset();
-        y = e.originalEvent.touches[0].pageY - o.top;
-    } else {
-        y = e.offsetY == undefined ? e.originalEvent.layerY : e.offsetY;
-    }
+    var y = e.offsetY == undefined ? e.originalEvent.layerY : e.offsetY;
+
     if (y < 65) {
         if (fluidbook.pad.enabled) {
             fluidbook.goPreviousChapter();