Skip to content

Commit bbac99b

Browse files
committed
make sure gl2d axis scale updates on interactions
1 parent 4ba7551 commit bbac99b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/plots/gl2d/scene2d.js

+6
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ proto.updateSize = function(canvas) {
238238
};
239239

240240
proto.computeTickMarks = function() {
241+
this.xaxis.setScale();
242+
this.yaxis.setScale();
243+
244+
// override _length from backward compatibility
245+
// even though setScale 'should' give the correct result
241246
this.xaxis._length =
242247
this.glplot.viewBox[2] - this.glplot.viewBox[0];
243248
this.yaxis._length =
@@ -424,6 +429,7 @@ proto.plot = function(fullData, calcData, fullLayout) {
424429
ax._length = options.viewBox[i + 2] - options.viewBox[i];
425430

426431
Axes.doAutoRange(ax);
432+
ax.setScale();
427433
}
428434

429435
options.ticks = this.computeTickMarks();

0 commit comments

Comments
 (0)