diff --git a/js/jquery.flot.tooltip.source.js b/js/jquery.flot.tooltip.source.js index 379efba..d3720ce 100644 --- a/js/jquery.flot.tooltip.source.js +++ b/js/jquery.flot.tooltip.source.js @@ -249,6 +249,7 @@ var totalTipHeight = $tip.outerHeight() + that.tooltipOptions.shifts.y; if ((pos.x - $(window).scrollLeft()) > ($(window)[that.wfunc]() - totalTipWidth)) { pos.x -= totalTipWidth; + pos.x = Math.max(pos.x, 0); } if ((pos.y - $(window).scrollTop()) > ($(window)[that.hfunc]() - totalTipHeight)) { pos.y -= totalTipHeight;