From 6879b59c4143c463021e540d39dc0f872582446d Mon Sep 17 00:00:00 2001 From: Ian Holmes Date: Tue, 28 Jun 2016 18:14:02 -0700 Subject: [PATCH] fixed tooltip positioning on Firefox --- src/Rotunda/View/Track.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Rotunda/View/Track.js b/src/Rotunda/View/Track.js index 3b810a0..042b1c6 100644 --- a/src/Rotunda/View/Track.js +++ b/src/Rotunda/View/Track.js @@ -1,8 +1,10 @@ define(["dojo/_base/declare", "dojo/_base/lang", + "dojo/dom-geometry", "Rotunda/util"], function(declare, lang, + domGeom, util) { /** * @class @@ -84,7 +86,9 @@ return declare (null, tooltip.style("visibility", "visible") .html (featureLabel (feature)) }).on("mousemove", function(feature) { - tooltip.style("top", (event.pageY-10)+"px").style("left",(event.pageX+10)+"px") + var x = d3.event.clientX + var y = d3.event.clientY + tooltip.style("top", (y-10)+"px").style("left",(x+10)+"px") }).on("mouseout", function(feature) { tooltip.style("visibility", "hidden") if (highlightColor) {