Skip to content

Commit 62ab845

Browse files
committed
remove obsolete code from old d.{xp|yp} optimization attempt
1 parent 9becb7c commit 62ab845

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/components/drawing/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ drawing.setRect = function(s, x, y, w, h) {
6868
* false if selection could not get translated
6969
*/
7070
drawing.translatePoint = function(d, sel, xa, ya) {
71-
// put xp and yp into d if pixel scaling is already done
72-
var x = d.xp = xa.c2p(d.x);
73-
var y = d.yp = ya.c2p(d.y);
71+
var x = xa.c2p(d.x);
72+
var y = ya.c2p(d.y);
7473

7574
if(isNumeric(x) && isNumeric(y) && sel.node()) {
7675
// for multiline text this works better

src/traces/scatter/plot.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,10 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
501501
join.selectAll('text')
502502
.call(Drawing.textPointStyle, trace, gd)
503503
.each(function(d) {
504-
505504
// This just *has* to be totally custom becuase of SVG text positioning :(
506505
// It's obviously copied from translatePoint; we just can't use that
507-
//
508-
// put xp and yp into d if pixel scaling is already done
509-
var x = d.xp || xa.c2p(d.x),
510-
y = d.yp || ya.c2p(d.y);
506+
var x = xa.c2p(d.x);
507+
var y = ya.c2p(d.y);
511508

512509
d3.select(this).selectAll('tspan.line').each(function() {
513510
transition(d3.select(this)).attr({x: x, y: y});

0 commit comments

Comments
 (0)