From 0c5ee3f2a4c95b82ae531d42a336e396289196b9 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 3 May 2017 20:01:40 +0200 Subject: [PATCH] fix #1374 @0.5 --- _index.html | 4 ++-- js/libs/fluidbook/fluidbook.nav.js | 4 ++-- js/libs/fluidbook/fluidbook.resize.js | 8 +------- js/main.js | 18 +++--------------- 4 files changed, 8 insertions(+), 26 deletions(-) diff --git a/_index.html b/_index.html index ba0555e0..ff0481a8 100644 --- a/_index.html +++ b/_index.html @@ -10,7 +10,7 @@ - + @@ -18,7 +18,7 @@ - +
diff --git a/js/libs/fluidbook/fluidbook.nav.js b/js/libs/fluidbook/fluidbook.nav.js index 69e0972b..80adbb7a 100644 --- a/js/libs/fluidbook/fluidbook.nav.js +++ b/js/libs/fluidbook/fluidbook.nav.js @@ -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 diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 49468ff9..ffbc0c5b 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -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; diff --git a/js/main.js b/js/main.js index 0f3f250d..4ce48657 100644 --- a/js/main.js +++ b/js/main.js @@ -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(); -- 2.39.5