Fix raster example tooltips
This commit is contained in:
@@ -195,18 +195,18 @@ function plot(resolution, counts, threshold) {
|
||||
}
|
||||
tip.html(message(counts.min + index * counts.delta, area));
|
||||
tip.style('display', 'block');
|
||||
tip.transition().style({
|
||||
left: chartRect.left + index * barWidth + barWidth / 2 + 'px',
|
||||
top: d3.event.y - 60 + 'px',
|
||||
opacity: 1,
|
||||
});
|
||||
tip
|
||||
.transition()
|
||||
.style('left', chartRect.left + index * barWidth + barWidth / 2 + 'px')
|
||||
.style('top', d3.event.y - 60 + 'px')
|
||||
.style('opacity', 1);
|
||||
});
|
||||
|
||||
bar.on('mouseout', function () {
|
||||
tip
|
||||
.transition()
|
||||
.style('opacity', 0)
|
||||
.each('end', function () {
|
||||
.on('end', function () {
|
||||
tip.style('display', 'none');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user