Skip to content

Commit c8c3197

Browse files
committed
rm Drawing.pointStyle and Drawing.translatePoints on marker enter sel
... and order nodes on merge selection before styling/translating/removing-non-numeric item so that the order call acts on a merge selection in-sync with the DOM
1 parent 83234b5 commit c8c3197

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/traces/scatter/plot.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,6 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
419419
var enter = join.enter().append('path')
420420
.classed('point', true);
421421

422-
enter.call(Drawing.pointStyle, trace)
423-
.call(Drawing.translatePoints, xa, ya, trace);
424-
425422
if(hasTransition) {
426423
enter.style('opacity', 0).transition()
427424
.style('opacity', 1);
@@ -430,6 +427,8 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
430427
var markerScale = showMarkers && Drawing.tryColorscale(trace.marker, '');
431428
var lineScale = showMarkers && Drawing.tryColorscale(trace.marker, 'line');
432429

430+
join.order();
431+
433432
join.each(function(d) {
434433
var el = d3.select(this);
435434
var sel = transition(el);
@@ -444,8 +443,6 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
444443
}
445444
});
446445

447-
join.order();
448-
449446
if(hasTransition) {
450447
join.exit().transition()
451448
.style('opacity', 0)
@@ -462,6 +459,8 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
462459
// it gets converted to mathjax
463460
join.enter().append('g').classed('textpoint', true).append('text');
464461

462+
join.order();
463+
465464
join.each(function(d) {
466465
var g = d3.select(this);
467466
var sel = transition(g.select('text'));
@@ -485,8 +484,6 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
485484
});
486485
});
487486

488-
join.order();
489-
490487
join.exit().remove();
491488
}
492489

0 commit comments

Comments
 (0)