Prevent tooltip from being hidden by sidebar

This commit is contained in:
Adam Warner
2018-04-13 20:33:11 +01:00
parent 7244e3a9e0
commit 2be54bc17a

View File

@@ -92,6 +92,11 @@ var customTooltips = function(tooltip) {
{
width = $(document).width()-400;
}
// Prevent tooltip disapearing behind the sidebar
if(tooltip.caretX < 100)
{
width = 100;
}
tooltipEl.style.opacity = 1;
tooltipEl.style.left = position.left + width + "px";
tooltipEl.style.top = position.top + tooltip.caretY + "px";