From: Vincent Vanwaelscappel Date: Mon, 13 Feb 2017 17:41:48 +0000 (+0100) Subject: fix #1138 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=dc74ca3b53925770e623afc37f21c0d2214070b2;p=fluidbook-html5.git fix #1138 @1.5 --- diff --git a/js/libs/fluidbook/fluidbook.tooltip.js b/js/libs/fluidbook/fluidbook.tooltip.js index 3ad2bebb..1c5619e8 100644 --- a/js/libs/fluidbook/fluidbook.tooltip.js +++ b/js/libs/fluidbook/fluidbook.tooltip.js @@ -1,5 +1,6 @@ function FluidbookTooltip(fluidbook) { this.fluidbook = fluidbook; + this.displaying = false; this.init(); } @@ -7,51 +8,76 @@ FluidbookTooltip.prototype = { init: function () { var $this = this; - $(document).on('mouseover', 'a[data-tooltip]', function () { - if (Modernizr.ftouch && !$(this).is("[data-tooltip-touch]")) { - return true; - } - var maxWidth = 140; - if ($(this).data('tooltip-maxwidth') !== null) { - maxWidth = $(this).data('tooltip-maxwidth'); - } - - maxWidth *= 1.28; - maxWidth = Math.round(maxWidth); - - var position = $(this).offset(); - position.top += $(this).outerHeight() + 20; - - var text = $(this).data('tooltip'); - text = $('