From: Vincent Vanwaelscappel Date: Wed, 2 Mar 2022 18:33:44 +0000 (+0100) Subject: wait #5134 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6b81450681a499e0657fa4f5ae067071c5a65b75;p=fluidbook-html5.git wait #5134 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.help.js b/js/libs/fluidbook/fluidbook.help.js index 1472ac87..0566dde2 100644 --- a/js/libs/fluidbook/fluidbook.help.js +++ b/js/libs/fluidbook/fluidbook.help.js @@ -379,12 +379,30 @@ FluidbookHelp.prototype = { if ($("#slider").length > 0) { var positionSliderLabel = function () { var sliderHelp = $this.view.find('.slider'); + var span = $(sliderHelp).find('span'); var sliderCursor = $('#slidercursor .visible'); + var bottom = Math.round(hh - sliderCursor.offset().top); + var left = Math.round(sliderCursor.offset().left + (sliderCursor.width() / 2)); + var spanTop=-8; + var spanLeft=0; + var diff=($(span).width() + left) - ($this.fluidbook.resize.ww-10); + var height=null; + if (diff>0) { + spanLeft=-diff; + spanTop=-25; + height=0; + } + sliderHelp.css({ - bottom: Math.round(hh - sliderCursor.offset().top), - left: Math.round(sliderCursor.offset().left + (sliderCursor.width() / 2)), + bottom: bottom, + left: left, + height:height, transformOrigin: 'left bottom' }); + $(span).css({ + top:spanTop, + left:spanLeft, + }); }; positionSliderLabel(); // Run immediately setTimeout(positionSliderLabel, 250); // delay slightly to make sure co-ordinates are correct diff --git a/style/help.less b/style/help.less index 7176203e..b52ca83c 100644 --- a/style/help.less +++ b/style/help.less @@ -223,7 +223,6 @@ span { position: relative; - top: -0.5em; } }