Skip to content

Commit 6194457

Browse files
committed
🔪 ax._min / ax._max logic for rangeslider
- questionable commit, especially the part in autorange.js, but this doesn't make any test fail ?!?
1 parent 736ab69 commit 6194457

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/components/rangeslider/calc_autorange.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ module.exports = function calcAutorange(gd) {
2121
// this step in subsequent draw calls.
2222

2323
for(var i = 0; i < axes.length; i++) {
24-
var ax = axes[i],
25-
opts = ax[constants.name];
24+
var ax = axes[i];
25+
var opts = ax[constants.name];
2626

27-
// Don't try calling getAutoRange if _min and _max are filled in.
28-
// This happens on updates where the calc step is skipped.
29-
30-
if(opts && opts.visible && opts.autorange && ax._min.length && ax._max.length) {
27+
if(opts && opts.visible && opts.autorange) {
3128
opts._input.autorange = true;
3229
opts._input.range = opts.range = getAutoRange(gd, ax);
3330
}

src/plots/cartesian/autorange.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,7 @@ function doAutoRange(gd, ax) {
267267
var axeRangeOpts = ax._anchorAxis.rangeslider[ax._name];
268268
if(axeRangeOpts) {
269269
if(axeRangeOpts.rangemode === 'auto') {
270-
if(hasDeps) {
271-
axeRangeOpts.range = getAutoRange(ax);
272-
} else {
273-
axeRangeOpts.range = ax._rangeInitial ? ax._rangeInitial.slice() : ax.range.slice();
274-
}
270+
axeRangeOpts.range = getAutoRange(gd, ax);
275271
}
276272
}
277273
axIn = ax._anchorAxis._input;

0 commit comments

Comments
 (0)