From: Vincent Vanwaelscappel Date: Tue, 17 Sep 2019 10:28:21 +0000 (+0200) Subject: fix #3048 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=db11fe3c73a408d3eb05128b8e6560181be344b3;p=fluidbook-html5.git fix #3048 @1.5 --- diff --git a/js/libs/fluidbook/fluidbook.touch.js b/js/libs/fluidbook/fluidbook.touch.js index 370d877f..20b4b831 100644 --- a/js/libs/fluidbook/fluidbook.touch.js +++ b/js/libs/fluidbook/fluidbook.touch.js @@ -84,7 +84,6 @@ FluidbookTouch.prototype = { if (doubletapEnabled) { // Double tap hm.on('doubletap', function (event) { - console.log('doubletap'); if ($this.fluidbook.zoom.enabled) { if ($this.fluidbook.zoom.zoom > 1) { $this.fluidbook.zoom.setTransition(true); @@ -103,7 +102,6 @@ FluidbookTouch.prototype = { // Pinch hm.on('pinchstart', function (event) { - console.log('pinchstart'); if ($this.fluidbook.zoom.enabled) { if ($this.fluidbook.zoom.zoom === 1) { $this.setZoomOriginFromEvent({'pageX': event.center.x, 'pageY': event.center.y}); @@ -116,7 +114,6 @@ FluidbookTouch.prototype = { hm.on('pinch', function (event) { if ($this.fluidbook.zoom.enabled) { - console.log('pinch'); if ($this.zoomAtPinchStart !== 0) { $this.pinchZoom(event.scale, false); event.preventDefault(); @@ -125,7 +122,6 @@ FluidbookTouch.prototype = { }); hm.on('pinchend pinchcancel', function (event) { if ($this.fluidbook.zoom.enabled) { - console.log('pinchend'); $this.pinchZoom(event.scale, true); $this.zoomAtPinchStart = $this.fluidbook.zoom.zoom; } @@ -137,7 +133,7 @@ FluidbookTouch.prototype = { var hmf = new Hammer.Manager(document.getElementById(panElementId), options); hmf.add(new Hammer.Pan({threshold: 0})); hmf.on('pan', function (event) { - console.log(event); + }); hmf.on('panstart', function (event) { if ($this.drag(event, 'start')) { @@ -193,7 +189,6 @@ FluidbookTouch.prototype = { this.offsetX = (e.center.x - this.startX) / this.fluidbook.resize.ww; this.offsetY = (e.center.y - this.startY) / this.fluidbook.resize.hh; - console.log(type, (e.center.x - this.startX), this.offsetX); return this.testSlideOffset(e); } else { @@ -201,9 +196,9 @@ FluidbookTouch.prototype = { if (type === 'end') { e.deltaX += e.velocityX * 200; e.deltaY += e.velocityY * 200; - this.dragZoom(e, end); + this.dragZoom(e, true); } else { - this.dragZoom(e, end); + this.dragZoom(e, true); } return true; } @@ -267,7 +262,6 @@ FluidbookTouch.prototype = { } else { this.fluidbook.goPreviousPage(); } - console.log('change page triggered :)'); return true; } else { // Mode mag pad