Add another div to the tail (#829)

This commit is contained in:
John Firebaugh
2013-02-27 17:52:06 -08:00
parent cdd7612906
commit 95b23b0760
+6 -5
View File
@@ -1,6 +1,7 @@
d3.tail = function() {
var text = false,
container,
inner,
xmargin = 25,
tooltip_size = [0, 0],
selection_size = [0, 0],
@@ -13,11 +14,12 @@ d3.tail = function() {
});
function setup() {
container = d3.select(document.body)
.append('div')
.style('display', 'none')
.attr('class', 'tail tooltip-inner');
.style('display', 'none')
.attr('class', 'tail tooltip-inner');
inner = container.append('div');
selection
.on('mousemove.tail', mousemove)
@@ -28,7 +30,6 @@ d3.tail = function() {
.on('mousemove.tail', mousemove);
selection_size = selection.size();
}
function show() {
@@ -69,7 +70,7 @@ d3.tail = function() {
return tail;
}
text = _;
container.text(text);
inner.text(text);
tooltip_size = container.size();
return tail;
};