Skip to content

Commit 49e5da5

Browse files
committedMay 11, 2017
use new Drawing.translatePoint return boolean to clear <g textpoint>
1 parent 68959b3 commit 49e5da5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/traces/scatter/plot.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,10 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
458458
join.enter().append('g').classed('textpoint', true).append('text');
459459

460460
join.each(function(d) {
461-
var sel = transition(d3.select(this).select('text'));
462-
Drawing.translatePoint(d, sel, xa, ya);
461+
var g = d3.select(this);
462+
var sel = transition(g.select('text'));
463+
var hasTextPt = Drawing.translatePoint(d, sel, xa, ya);
464+
if(!hasTextPt) g.remove();
463465
});
464466

465467
join.selectAll('text')

0 commit comments

Comments
 (0)
Please sign in to comment.