Skip to content

Commit d9bb617

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 d24eaef commit d9bb617

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
@@ -258,11 +258,7 @@ function doAutoRange(gd, ax) {
258258
var axeRangeOpts = ax._anchorAxis.rangeslider[ax._name];
259259
if(axeRangeOpts) {
260260
if(axeRangeOpts.rangemode === 'auto') {
261-
if(hasDeps) {
262-
axeRangeOpts.range = getAutoRange(ax);
263-
} else {
264-
axeRangeOpts.range = ax._rangeInitial ? ax._rangeInitial.slice() : ax.range.slice();
265-
}
261+
axeRangeOpts.range = getAutoRange(gd, ax);
266262
}
267263
}
268264
axIn = ax._anchorAxis._input;

0 commit comments

Comments
 (0)