tooltip fixes applied

master-patched
Dingo 12 years ago
parent a056949ca4
commit 36a242846a

@ -182,25 +182,27 @@ d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
case 'w':
left = pos[0] + dist;
top = pos[1] - (height / 2);
if (left + width > windowWidth) left = pos[0] - width - dist;
if (top < scrollTop) top = scrollTop + 5;
if (top + height > scrollTop + windowHeight) top = scrollTop - height - 5;
if (tLeft + width > windowWidth) left = pos[0] - width - dist;
if (tTop < scrollTop) top = scrollTop + 5;
if (tTop + height > scrollTop + windowHeight) top = scrollTop - height - 5;
break;
case 'n':
left = pos[0] - (width / 2) - 5;
top = pos[1] + dist;
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (left < scrollLeft) left = scrollLeft + 5;
if (left + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
break;
case 's':
left = pos[0] - (width / 2);
top = pos[1] - height - dist;
if (left < scrollLeft) left = scrollLeft + 5;
if (left + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (scrollTop > top) top = pos[1] + 20;
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (scrollTop > tTop) top = scrollTop;
break;
}

10
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -84,9 +84,11 @@
case 's':
left = pos[0] - (width / 2);
top = pos[1] - height - dist;
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (scrollTop > tTop) top = pos[1] + 20;
if (scrollTop > tTop) top = scrollTop;
break;
}

Loading…
Cancel
Save