From: Vincent Vanwaelscappel Date: Thu, 17 Aug 2017 16:37:57 +0000 (+0200) Subject: fix #1487 @4 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6488888afd4c7547b60d7589cafacb702a6bb9b4;p=fluidbook-html5.git fix #1487 @4 --- diff --git a/js/libs/fluidbook/fluidbook.touch.js b/js/libs/fluidbook/fluidbook.touch.js index a8112d89..b5e46429 100644 --- a/js/libs/fluidbook/fluidbook.touch.js +++ b/js/libs/fluidbook/fluidbook.touch.js @@ -60,7 +60,9 @@ FluidbookTouch.prototype = { // Pinch hm.on('pinchstart', function (event) { - $this.setZoomOriginFromEvent({'pageX': event.center.x, 'pageY': event.center.y}); + if ($this.fluidbook.zoom.zoom == 1) { + $this.setZoomOriginFromEvent({'pageX': event.center.x, 'pageY': event.center.y}); + } $this.zoomAtPinchStart = $this.fluidbook.zoom.zoom; $this.pinchZoom(event.scale, false); event.preventDefault(); @@ -94,6 +96,10 @@ FluidbookTouch.prototype = { pinchZoom: function (s, end) { + if (s == 1) { + return; + } + this.fluidbook.zoom.setTransition(false); var amplitudeRegulation = 0.2 * this.zoomAtPinchStart; var dir; diff --git a/js/libs/fluidbook/fluidbook.zoom.js b/js/libs/fluidbook/fluidbook.zoom.js index 542d451e..3e59c94c 100644 --- a/js/libs/fluidbook/fluidbook.zoom.js +++ b/js/libs/fluidbook/fluidbook.zoom.js @@ -160,7 +160,7 @@ FluidbookZoom.prototype = { animation.origin = ['50%', '50%']; } - var hiddenElements = $("header,footer,#interface"); + var hiddenElements = $("header,footer,#interface,#links a.bookmark"); if (this.zoom != 1) { if (!$('header').hasClass('hidden')) { diff --git a/style/fluidbook.less b/style/fluidbook.less index 0f63dc05..97ae240b 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -342,7 +342,7 @@ body, html { } @zoomtransition: 350ms; -@zoomtransitioninertia:400ms; +@zoomtransitioninertia: 400ms; #z { position: absolute; @@ -365,7 +365,7 @@ body, html { transition: none; } - &.transition-inertia{ + &.transition-inertia { -moz-transition: -moz-transform-origin @zoomtransitioninertia ease-out, transform-origin @zoomtransitioninertia ease-out; -webkit-transition: -webkit-transform-origin @zoomtransitioninertia ease-out, transform-origin @zoomtransitioninertia ease-out; -o-transition: -o-transform-origin @zoomtransitioninertia ease-out, transform-origin @zoomtransitioninertia ease-out; @@ -718,6 +718,12 @@ footer, header, #interface { } } +a.bookmark { + &.hidden { + visibility: hidden; + } +} + // Hack for #1433 html.ios body.portrait #interface { -moz-transition: none;