Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce762e8

Browse files
committed
scatter: call translatePoint on the merged selection
- so that <text> are properly translate on range relayout calls
1 parent f8ac787 commit ce762e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/traces/scatter/plot.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,12 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
451451
// each text needs to go in its own 'g' in case
452452
// it gets converted to mathjax
453453
join.enter().append('g')
454-
.append('text')
455-
.call(Drawing.translatePoints, xa, ya);
454+
.append('text');
455+
456+
join.each(function(d) {
457+
var sel = d3.select(this).select('text');
458+
Drawing.translatePoint(d, sel, xa, ya);
459+
});
456460

457461
join.exit().remove();
458462
}

0 commit comments

Comments
 (0)