Skip to content

Commit 1cdc36b

Browse files
committed
🔪 obsolete _rangesliderAutorange field
... this was used to not skip Axes.expand when ax autorange was false, but range slider range wasn't set.
1 parent 026cd53 commit 1cdc36b

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

src/components/rangeslider/defaults.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) {
4646
coerce('borderwidth');
4747
coerce('thickness');
4848

49-
axOut._rangesliderAutorange = coerce('autorange', !axOut.isValidRange(containerIn.range));
49+
coerce('autorange', !axOut.isValidRange(containerIn.range));
5050
coerce('range');
5151

5252
var subplots = layoutOut._subplots;
@@ -76,7 +76,6 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) {
7676
if(rangeMode !== 'match') {
7777
coerceRange('range', yAxOut.range.slice());
7878
}
79-
yAxOut._rangesliderAutorange = (rangeMode === 'auto');
8079
}
8180
}
8281

src/plots/cartesian/axis_defaults.js

-7
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
4848
setConvert(containerOut, layoutOut);
4949

5050
var autoRange = coerce('autorange', !containerOut.isValidRange(containerIn.range));
51-
52-
// both x and y axes may need autorange done just for the range slider's purposes
53-
// the logic is complicated to figure this out later, particularly for y axes since
54-
// the settings can be spread out in the x axes... so instead we'll collect them
55-
// during supplyDefaults
56-
containerOut._rangesliderAutorange = false;
57-
5851
if(autoRange) coerce('rangemode');
5952

6053
coerce('range');

test/jasmine/tests/axes_test.js

-12
Original file line numberDiff line numberDiff line change
@@ -1874,18 +1874,6 @@ describe('Test axes', function() {
18741874
expect(ax._min).toEqual([{val: 2, pad: 0, extrapad: false}]);
18751875
expect(ax._max).toEqual([{val: 5, pad: 0, extrapad: false}]);
18761876
});
1877-
1878-
it('should consider range slider `autorange`', function() {
1879-
ax = getDefaultAx();
1880-
data = [2, 5];
1881-
1882-
ax.autorange = false;
1883-
ax._rangesliderAutorange = true;
1884-
1885-
expand(ax, data, {});
1886-
expect(ax._min).toEqual([{val: 2, pad: 0, extrapad: false}]);
1887-
expect(ax._max).toEqual([{val: 5, pad: 0, extrapad: false}]);
1888-
});
18891877
});
18901878

18911879
describe('calcTicks and tickText', function() {

0 commit comments

Comments
 (0)