]> _ Git - fluidbook-html5.git/commitdiff
wait #5134 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 2 Mar 2022 18:33:44 +0000 (19:33 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 2 Mar 2022 18:33:44 +0000 (19:33 +0100)
js/libs/fluidbook/fluidbook.help.js
style/help.less

index 1472ac87d8e298c0fd7e99f80d6953e6d8ebee83..0566dde297a0aa153390f772c6a3c5755ed6bce3 100644 (file)
@@ -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
index 7176203e72f8e697cf0bb5965c118e5834ed2edc..b52ca83cf61e5ad77eeaf27de5504a7af6de2e83 100644 (file)
 
   span {
     position: relative;
-    top: -0.5em;
   }
 }