From e111ea2aa5e4f587cf7f39a15290069e920b080c Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 17 Jan 2013 12:22:11 -0500 Subject: [PATCH] Gracefully handle Opera, which does not support pointer-events --- js/lib/d3.tail.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/lib/d3.tail.js b/js/lib/d3.tail.js index 00627de0a..8046e4a96 100644 --- a/js/lib/d3.tail.js +++ b/js/lib/d3.tail.js @@ -22,6 +22,9 @@ d3.tail = function() { .on('mouseover.tail', mouseover) .on('mouseout.tail', mouseout); + container + .on('mousemove.tail', mousemove); + selection_size = selection.size(); } @@ -36,11 +39,13 @@ d3.tail = function() { } function mouseout() { - if (text !== false) container.style('display', 'none'); + if (d3.event.relatedTarget !== container.node() && + text !== false) container.style('display', 'none'); } function mouseover() { - if (text !== false) container.style('display', 'block'); + if (d3.event.relatedTarget !== container.node() && + text !== false) container.style('display', 'block'); } if (!container) setup();