Fix tail position

This commit is contained in:
Ansis Brammanis
2013-02-22 17:37:06 -05:00
parent 9732d8c659
commit 8099666f38
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -1509,6 +1509,20 @@ a.success-action {
border-width: 5px 0 5px 5px;
}
.left.tail::after {
content: "";
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
top: 50%;
left: -5px;
margin-top: -5px;
border-right-color: white;
border-width: 5px 5px 5px 0;
}
.tooltip-arrow {
position: absolute;
width: 0;
+1
View File
@@ -33,6 +33,7 @@ d3.tail = function() {
if (text === false) return;
var xoffset = ((d3.event.clientX + tooltip_size[0] + xmargin) > selection_size[0]) ?
-tooltip_size[0] - xmargin : xmargin;
container.classed('left', xoffset > 0);
container.style(transformProp, 'translate(' +
(~~d3.event.clientX + xoffset) + 'px,' +
~~d3.event.clientY + 'px)');