Commit a2e6408b by Axel Pirek Committed by Axel Pirek

Only render tooltip if position is in viewport

parent 57099f02
...@@ -177,6 +177,11 @@ function ($, core) { ...@@ -177,6 +177,11 @@ function ($, core) {
} }
pos.pageX = elem.offset().left + pointOffset.left; pos.pageX = elem.offset().left + pointOffset.left;
pos.pageY = elem.offset().top + elem.height() * pos.panelRelY; pos.pageY = elem.offset().top + elem.height() * pos.panelRelY;
var isVisible = pos.pageY >= $(window).scrollTop() && pos.pageY <= $(window).innerHeight() + $(window).scrollTop();
if (!isVisible) {
self.clear(plot);
return;
}
plot.setCrosshair(pos); plot.setCrosshair(pos);
allSeriesMode = true; allSeriesMode = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment