From b61a4b6551d63eeeea66497b7acb081bd648a81f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 28 Mar 2019 12:36:13 +0100 Subject: [PATCH] wait #2653 @1 --- js/libs/fluidbook/fluidbook.input.js | 2 +- js/libs/fluidbook/fluidbook.touch.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.input.js b/js/libs/fluidbook/fluidbook.input.js index b12bb2ae..b5413f8c 100644 --- a/js/libs/fluidbook/fluidbook.input.js +++ b/js/libs/fluidbook/fluidbook.input.js @@ -21,7 +21,7 @@ FluidbookInput.prototype = { return; } - if (Modernizr.iOS || Modernizr.android) { + if (Modernizr.ios || Modernizr.android) { this.usingTouch = this.hasTouch = this.forceTouch = true; this.usingMouse = this.hasMouse = this.forceMouse = false; this.setTouchClasses(); diff --git a/js/libs/fluidbook/fluidbook.touch.js b/js/libs/fluidbook/fluidbook.touch.js index b5e46429..cc867e5f 100644 --- a/js/libs/fluidbook/fluidbook.touch.js +++ b/js/libs/fluidbook/fluidbook.touch.js @@ -47,6 +47,7 @@ FluidbookTouch.prototype = { // Double tap hm.on('doubletap', function (event) { + console.log('doubletap'); if ($this.fluidbook.zoom.zoom > 1) { $this.fluidbook.zoom.setTransition(true); $this.fluidbook.zoom.resetZoom(); @@ -60,6 +61,7 @@ FluidbookTouch.prototype = { // Pinch hm.on('pinchstart', function (event) { + console.log('pinchstart'); if ($this.fluidbook.zoom.zoom == 1) { $this.setZoomOriginFromEvent({'pageX': event.center.x, 'pageY': event.center.y}); } @@ -69,12 +71,14 @@ FluidbookTouch.prototype = { }); hm.on('pinch', function (event) { + console.log('pinch'); if ($this.zoomAtPinchStart != 0) { $this.pinchZoom(event.scale, false); event.preventDefault(); } }); hm.on('pinchend pinchcancel', function (event) { + console.log('pinchend'); $this.pinchZoom(event.scale, true); $this.zoomAtPinchStart = $this.fluidbook.zoom.zoom; event.preventDefault(); @@ -83,10 +87,12 @@ FluidbookTouch.prototype = { var hmf = new Hammer.Manager(document.getElementById('fluidbook'), {domEvents: false}); hmf.add(new Hammer.Pan({threshold: 0})); hmf.on('panmove', function (event) { + console.log('panmove'); $this.drag(event); event.preventDefault(); }); hmf.on('panend', function (event) { + console.log('panend'); $this.drag(event, true); $this.startX = $this.startY = -1; $this.panX = $this.panY = 0; @@ -95,7 +101,6 @@ FluidbookTouch.prototype = { }, pinchZoom: function (s, end) { - if (s == 1) { return; } -- 2.39.5