Gracefully handle Opera, which does not support pointer-events

This commit is contained in:
Tom MacWright
2013-01-17 12:22:11 -05:00
parent d550eda443
commit e111ea2aa5

View File

@@ -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();