From b49d94ce901d3306fc3faa6aac4b5fb12956b317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sun, 23 May 2021 17:05:28 +0200 Subject: [PATCH] Fix raster example tooltips --- examples/raster.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/raster.js b/examples/raster.js index 2abdfd463a..a15a7476f3 100644 --- a/examples/raster.js +++ b/examples/raster.js @@ -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'); }); });