Skip to content

Commit 224d418

Browse files
committed
use _needsExpand to determine if new rangeslider range is required
- instead of `(!rangeslider.range)`-based criterion - which allows for data update to correctly expand the range slider - rm now useless axis.autorange criterion for _needsExpand
1 parent e7f69c9 commit 224d418

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/rangeslider/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = function handleDefaults(layoutIn, layoutOut, axName) {
3636
coerce('range');
3737

3838
// Expand slider range to the axis range
39-
if(containerOut.range && !axOut.autorange) {
39+
if(containerOut.range) {
4040
// TODO: what if the ranges are reversed?
4141
var outRange = containerOut.range,
4242
axRange = axOut.range;

src/components/rangeslider/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = function(gd) {
8282
// compute new slider range using axis autorange if necessary
8383
// copy back range to input range slider container to skip
8484
// this step in subsequent draw calls
85-
if(!opts.range) {
85+
if(axisOpts._needsExpand && axisOpts._min.length && axisOpts._max.length) {
8686
opts._input.range = opts.range = Axes.getAutoRange(axisOpts);
8787
}
8888

0 commit comments

Comments
 (0)