From: Vincent Vanwaelscappel Date: Tue, 5 Apr 2022 10:07:53 +0000 (+0200) Subject: wait #5212 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6e404ce195a62c013e958fec5347a34eb67c9074;p=fluidbook-html5.git wait #5212 @0.25 --- diff --git a/js/libs/fluidbook/fluidbook.tooltip.js b/js/libs/fluidbook/fluidbook.tooltip.js index ce1ed7c6..213770e7 100644 --- a/js/libs/fluidbook/fluidbook.tooltip.js +++ b/js/libs/fluidbook/fluidbook.tooltip.js @@ -173,7 +173,8 @@ FluidbookTooltip.prototype = { style = ''; } t.attr('data-style', style); - css.maxWidth = 250; + var tooltipMaxWidth=Math.max(250,this.fluidbook.settings.linkTooltipMaxWidth); + css.maxWidth = tooltipMaxWidth; if (Modernizr.cssvars) { if (css.backgroundColor) { t.get(0).style.setProperty('--background-color', css.backgroundColor); @@ -190,7 +191,7 @@ FluidbookTooltip.prototype = { t.css(css).html(text).show(); var nbchars = t.text().length; - var maxWidth = Math.min(this.fluidbook.resize.ww, Math.max(250, Math.min(750, nbchars * 1.2))); + var maxWidth = Math.min(this.fluidbook.resize.ww, Math.max(tooltipMaxWidth, Math.min(750, nbchars * 1.2))); for (var w = 250; w <= maxWidth; w += 25) { if ((t.height() * 1.5) > t.width()) {