Skip to content

Commit 813d47f

Browse files
committed
use selection stashes when animating axes
1 parent d3abd26 commit 813d47f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/plots/cartesian/transition_axes.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,12 @@ module.exports = function transitionAxes(gd, newLayout, transitionOpts, makeOnCo
239239

240240
subplot.plot
241241
.call(Drawing.setTranslate, plotDx, plotDy)
242-
.call(Drawing.setScale, xScaleFactor, yScaleFactor)
242+
.call(Drawing.setScale, xScaleFactor, yScaleFactor);
243243

244-
// This is specifically directed at scatter traces, applying an inverse
245-
// scale to individual points to counteract the scale of the trace
246-
// as a whole:
247-
.selectAll('.points').selectAll('.point')
248-
.call(Drawing.setPointGroupScale, 1 / xScaleFactor, 1 / yScaleFactor);
249-
250-
subplot.plot.selectAll('.points').selectAll('.textpoint')
251-
.call(Drawing.setTextPointsScale, 1 / xScaleFactor, 1 / yScaleFactor);
244+
// apply an inverse scale to individual points to counteract
245+
// the scale of the trace group.
246+
Drawing.setPointGroupScale(subplot.zoomScalePts, 1 / xScaleFactor, 1 / yScaleFactor);
247+
Drawing.setTextPointsScale(subplot.zoomScaleTxt, 1 / xScaleFactor, 1 / yScaleFactor);
252248
}
253249

254250
var onComplete;

0 commit comments

Comments
 (0)