Skip to content

Commit e8382d9

Browse files
committed
RangeSlider: Make both relayout updates common for call to setRange ("xaxis.range" vs "xaxis.range[0]")
1 parent cbbb2ca commit e8382d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plot_api/plot_api.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,8 +2438,9 @@ Plotly.relayout = function relayout(gd, astr, val) {
24382438
}
24392439

24402440
function setRange(changes) {
2441-
var newMin = changes['xaxis.range[0]'],
2442-
newMax = changes['xaxis.range[1]'];
2441+
2442+
var newMin = changes['xaxis.range'] ? changes['xaxis.range'][0] : changes['xaxis.range[0]'],
2443+
newMax = changes['xaxis.range'] ? changes['xaxis.range'][1] : changes['xaxis.range[1]'];
24432444

24442445
var rangeSlider = fullLayout.xaxis && fullLayout.xaxis.rangeslider ?
24452446
fullLayout.xaxis.rangeslider : {};

0 commit comments

Comments
 (0)