Permalink
Browse files

Fixes #1664

Unselecting a legend item doesn't always cause the voronoi paths to be cleaned, resulting possibly in leftover tooltips. See report in #1664
  • Loading branch information...
1 parent 79a2073 commit 8a38dad178fef04a8b78ae9b327ed59d0bd16fae @sylvinus sylvinus committed on GitHub Jan 2, 2017
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/models/scatter.js
@@ -217,6 +217,10 @@ nv.models.scatter = function() {
// inject series and point index for reference into voronoi
if (useVoronoi === true) {
+
+ // nuke all voronoi paths on reload and recreate them
+ wrap.select('.nv-point-paths').selectAll('path').remove();
+
var vertices = d3.merge(data.map(function(group, groupIndex) {
return group.values
.map(function(point, pointIndex) {
@@ -264,8 +268,6 @@ nv.models.scatter = function() {
}
});
- // nuke all voronoi paths on reload and recreate them
- wrap.select('.nv-point-paths').selectAll('path').remove();
var pointPaths = wrap.select('.nv-point-paths').selectAll('path').data(voronoi);
var vPointPaths = pointPaths
.enter().append("svg:path")

0 comments on commit 8a38dad

Please sign in to comment.