Skip to content

Commit 3f7601c

Browse files
committed
bypass marker node styling if removed during translatePoint
1 parent 49e5da5 commit 3f7601c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/traces/scatter/plot.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
391391
}
392392

393393
function makePoints(d) {
394-
var join, selection;
394+
var join, selection, hasNode;
395395

396396
var trace = d[0].trace,
397397
s = d3.select(this),
@@ -433,11 +433,14 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
433433
join.each(function(d) {
434434
var el = d3.select(this);
435435
var sel = transition(el);
436-
Drawing.translatePoint(d, sel, xa, ya);
437-
Drawing.singlePointStyle(d, sel, trace, markerScale, lineScale, gd);
436+
hasNode = Drawing.translatePoint(d, sel, xa, ya);
438437

439-
if(trace.customdata) {
440-
el.classed('plotly-customdata', d.data !== null && d.data !== undefined);
438+
if(hasNode) {
439+
Drawing.singlePointStyle(d, sel, trace, markerScale, lineScale, gd);
440+
441+
if(trace.customdata) {
442+
el.classed('plotly-customdata', d.data !== null && d.data !== undefined);
443+
}
441444
}
442445
});
443446

@@ -460,8 +463,8 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
460463
join.each(function(d) {
461464
var g = d3.select(this);
462465
var sel = transition(g.select('text'));
463-
var hasTextPt = Drawing.translatePoint(d, sel, xa, ya);
464-
if(!hasTextPt) g.remove();
466+
hasNode = Drawing.translatePoint(d, sel, xa, ya);
467+
if(!hasNode) g.remove();
465468
});
466469

467470
join.selectAll('text')

0 commit comments

Comments
 (0)