Fixed tooltip (#74074)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
50f332867a
commit
acc8ffed29
|
@ -107,6 +107,7 @@
|
|||
|
||||
.vgaVis__tooltip {
|
||||
max-width: 100%;
|
||||
position: fixed;
|
||||
|
||||
h2 {
|
||||
margin-bottom: $euiSizeS;
|
||||
|
|
|
@ -85,12 +85,12 @@ export class TooltipHandler {
|
|||
let anchorBounds;
|
||||
if (item.bounds.width() > this.centerOnMark || item.bounds.height() > this.centerOnMark) {
|
||||
// I would expect clientX/Y, but that shows incorrectly
|
||||
anchorBounds = createRect(event.pageX, event.pageY, 0, 0);
|
||||
anchorBounds = createRect(event.clientX, event.clientY, 0, 0);
|
||||
} else {
|
||||
const containerBox = this.container.getBoundingClientRect();
|
||||
anchorBounds = createRect(
|
||||
containerBox.left + view._origin[0] + item.bounds.x1 + window.pageXOffset,
|
||||
containerBox.top + view._origin[1] + item.bounds.y1 + window.pageYOffset,
|
||||
containerBox.left + view._origin[0] + item.bounds.x1,
|
||||
containerBox.top + view._origin[1] + item.bounds.y1,
|
||||
item.bounds.width(),
|
||||
item.bounds.height()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue