Skip to content

Commit

Permalink
fixed tooltip positioning on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
ihh committed Jun 29, 2016
1 parent 9c8563e commit 6879b59
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6879b59

Please sign in to comment.