Skip to content

Commit bf600bc

Browse files
committed
Move textpoint class to g and change transition axes selector
1 parent 0363db5 commit bf600bc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/plots/cartesian/transition_axes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo
153153
.selectAll('.points').selectAll('.point')
154154
.call(Drawing.setPointGroupScale, 1, 1);
155155

156-
subplot.plot.selectAll('.points').selectAll('g')
156+
subplot.plot.selectAll('.points').selectAll('.textpoint')
157157
.each(function() {
158158
var el = d3.select(this);
159159
var existingTransform = el.attr('transform').match(LAST_TRANSLATION_RE);
@@ -239,7 +239,7 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo
239239
.selectAll('.points').selectAll('.point')
240240
.call(Drawing.setPointGroupScale, 1 / xScaleFactor, 1 / yScaleFactor);
241241

242-
subplot.plot.selectAll('.points').selectAll('g')
242+
subplot.plot.selectAll('.points').selectAll('.textpoint')
243243
.each(function() {
244244
var el = d3.select(this);
245245
var text = el.select('text');

src/traces/scatter/plot.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,14 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
452452

453453
// each text needs to go in its own 'g' in case
454454
// it gets converted to mathjax
455-
join.enter().append('g').append('text');
455+
join.enter().append('g').classed('textpoint', true).append('text');
456456

457457
join.each(function(d) {
458458
var sel = transition(d3.select(this).select('text'));
459459
Drawing.translatePoint(d, sel, xa, ya);
460460
});
461461

462462
join.selectAll('text')
463-
.classed('textpoint', true)
464463
.call(Drawing.textPointStyle, trace)
465464
.each(function(d) {
466465

0 commit comments

Comments
 (0)