From 23e3350b8adfa45603c7225d7413ac872a338f43 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 21 Jun 2017 21:36:45 +0200 Subject: [PATCH] wip #1487 @1 --- js/libs/fluidbook/fluidbook.links.js | 4 ++-- js/libs/fluidbook/fluidbook.tooltip.js | 9 ++------- style/fluidbook.less | 14 +++++++++++++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 35882a1a..282a9543 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -17,7 +17,7 @@ FluidbookLinks.prototype = { $('body').append('
' + getSpriteIcon('interface-close') + '
'); - $(document).on('click touchend', '.zoomPopup', function (e) { + $(document).on('click', '.zoomPopup', function (e) { e.preventDefault(); $this.zoomLink(this); return false; @@ -28,7 +28,7 @@ FluidbookLinks.prototype = { return true; }); - $(document).on('click touchend', '#zoomPopupOverlay, #zoomPopupWrapper, #zoomPopupClose', function (e) { + $(document).on('click', '#zoomPopupOverlay, #zoomPopupWrapper, #zoomPopupClose', function (e) { $this.zoomLinkReset(); return false; }); diff --git a/js/libs/fluidbook/fluidbook.tooltip.js b/js/libs/fluidbook/fluidbook.tooltip.js index 06313a9f..761f7660 100644 --- a/js/libs/fluidbook/fluidbook.tooltip.js +++ b/js/libs/fluidbook/fluidbook.tooltip.js @@ -18,17 +18,12 @@ FluidbookTooltip.prototype = { $("#tooltip").transform({scale: 1 / zoom}).css({'marginTop': 20 / zoom, 'marginLeft': -10 / zoom}); }); - if (Modernizr.ftouch) { - $(document).on('touchstart', 'a[data-tooltip-touch][data-tooltip]', function (e) { - $this.updateMousePosition(e); - $this.eventTriggered(this); - }); - } else { + $(document).on('mouseover', 'a[data-tooltip]', function (e) { $this.updateMousePosition(e); $this.eventTriggered(this); }); - } + $("body").append('
'); }, diff --git a/style/fluidbook.less b/style/fluidbook.less index 93bb4e20..45b90581 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -237,7 +237,7 @@ body, html { /* Espaces forcés */ -#currentDoublePage{ +#currentDoublePage { pointer-events: none; } @@ -756,11 +756,23 @@ html.ios body.portrait #interface { pointer-events: none; } +@links-area-color: fadeout(@links-color, 40%); .link a { width: 100%; height: 100%; display: block; background-color: rgba(0, 0, 0, 0.01); + &.displayArea { + -webkit-tap-highlight-color: @links-area-color; + background-color: fadeout(@links-color, 99.999%); + &.animating { + background-color: @links-area-color; + } + .no-ftouch &:hover { + opacity: 1 !important; + background-color: @links-area-color; + } + } } #links .nonlinkarea { -- 2.39.5