Bug 1610728 - Fix tooltip positioning for html build resource viewer. r=dmajor

Differential Revision: https://phabricator.services.mozilla.com/D60626

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris Manchester 2020-01-22 13:30:42 +00:00
parent 7b4b742fdc
commit b2e7950b8e

View File

@ -460,13 +460,13 @@ function renderTimeline(id, resources) {
var e = d3.event;
x_offset = 10;
if (e.pageX > window.innerWidth / 2) {
if (e.clientX > window.innerWidth / 2) {
x_offset = -150;
}
d3.select("#tooltip")
.style("left", (e.pageX + x_offset) + "px")
.style("top", (e.pageY + 10) + "px")
.style("left", (e.clientX + x_offset) + "px")
.style("top", (e.clientY + 10) + "px")
;
})
;