Skip to content

Commit 23964ca

Browse files
committed
rm doAutoRangeAndConstraints step from "axrange" edits
- updating axes with constraints triggers a 'calc' edit, so no need to do this here.
1 parent a12a22b commit 23964ca

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/plot_api/plot_api.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,13 +1689,6 @@ exports.relayout = function relayout(gd, astr, val) {
16891689
// subroutine of its own so that finalDraw always gets
16901690
// executed after drawData
16911691
seq.push(
1692-
// TODO
1693-
// no test fail when commenting out doAutoRangeAndConstraints,
1694-
// but I think we do need this (maybe just the enforce part?)
1695-
// Am I right?
1696-
// More info in:
1697-
// https://github.com/plotly/plotly.js/issues/2540
1698-
subroutines.doAutoRangeAndConstraints,
16991692
// TODO
17001693
// can target specific axes,
17011694
// do not have to redraw all axes here
@@ -2174,7 +2167,6 @@ exports.update = function update(gd, traceUpdate, layoutUpdate, _traces) {
21742167
if(relayoutFlags.layoutstyle) seq.push(subroutines.layoutStyles);
21752168
if(relayoutFlags.axrange) {
21762169
seq.push(
2177-
subroutines.doAutoRangeAndConstraints,
21782170
subroutines.doTicksRelayout,
21792171
subroutines.drawData,
21802172
subroutines.finalDraw
@@ -2340,7 +2332,6 @@ exports.react = function(gd, data, layout, config) {
23402332
if(relayoutFlags.layoutstyle) seq.push(subroutines.layoutStyles);
23412333
if(relayoutFlags.axrange) {
23422334
seq.push(
2343-
subroutines.doAutoRangeAndConstraints,
23442335
subroutines.doTicksRelayout,
23452336
subroutines.drawData,
23462337
subroutines.finalDraw

test/jasmine/tests/plot_api_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ describe('Test plot api', function() {
631631
});
632632

633633
it('should trigger minimal sequence for cartesian axis range updates', function() {
634-
var seq = ['doAutoRangeAndConstraints', 'doTicksRelayout', 'drawData', 'finalDraw'];
634+
var seq = ['doTicksRelayout', 'drawData', 'finalDraw'];
635635

636636
function _assert(msg) {
637637
expect(gd.calcdata).toBeDefined();

0 commit comments

Comments
 (0)