mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix tooltips sometimes rendering outside of graph panel
I noticed tooltips on other panels rendering outside of their panel or even the browser window when hovering on the very edge of graphs with relative time overrides.
This commit is contained in:
@@ -181,8 +181,8 @@ function ($, core) {
|
||||
// get pageX from position on x axis and pageY from relative position in original panel
|
||||
if (pos.panelRelY) {
|
||||
var pointOffset = plot.pointOffset({x: pos.x});
|
||||
if (Number.isNaN(pointOffset.left) || pointOffset.left < 0) {
|
||||
$tooltip.detach();
|
||||
if (Number.isNaN(pointOffset.left) || pointOffset.left < 0 || pointOffset.left > elem.width()) {
|
||||
self.clear(plot);
|
||||
return;
|
||||
}
|
||||
pos.pageX = elem.offset().left + pointOffset.left;
|
||||
|
||||
Reference in New Issue
Block a user