Skip to content

Commit 3dd91b5

Browse files
Renammed new attributes for more clarity and portability
1 parent 91caff1 commit 3dd91b5

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

src/components/rangeslider/draw.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ module.exports = function(gd) {
136136

137137
opts._rl = [range0, range1];
138138

139-
if(oppAxisOpts.rangesliderFixedrange) {
140-
var range0OppAxis = oppAxisOpts.r2l(oppAxisOpts.rangesliderRange[0]),
141-
range1OppAxis = oppAxisOpts.r2l(oppAxisOpts.rangesliderRange[1]),
139+
if(oppAxisOpts.rangeslidermode) {
140+
var range0OppAxis = oppAxisOpts.r2l(oppAxisOpts.rangesliderrange[0]),
141+
range1OppAxis = oppAxisOpts.r2l(oppAxisOpts.rangesliderrange[1]),
142142
distOppAxis = range1OppAxis - range0OppAxis;
143143

144144
opts.d2pOppAxis = function(v) {
@@ -305,7 +305,7 @@ function setPixelRange(rangeSlider, gd, axisOpts, opts, oppAxisOpts) {
305305
.attr('x', pixelMax)
306306
.attr('width', opts._width - pixelMax);
307307

308-
if(oppAxisOpts.rangesliderFixedrange) {
308+
if(oppAxisOpts.rangeslidermode) {
309309
var pixelMinOppAxis = opts._height - clampOppAxis(opts.d2pOppAxis(oppAxisOpts._rl[1])),
310310
pixelMaxOppAxis = opts._height - clampOppAxis(opts.d2pOppAxis(oppAxisOpts._rl[0]));
311311

@@ -428,7 +428,7 @@ function drawRangePlot(rangeSlider, gd, axisOpts, opts) {
428428
mockFigure.layout[oppAxisName] = {
429429
type: oppAxisOpts.type,
430430
domain: [0, 1],
431-
range: oppAxisOpts.rangesliderFixedrange ? oppAxisOpts.rangesliderRange.slice() : oppAxisOpts.range.slice(),
431+
range: oppAxisOpts.rangeslidermode ? oppAxisOpts.rangesliderrange.slice() : oppAxisOpts.range.slice(),
432432
calendar: oppAxisOpts.calendar
433433
};
434434

@@ -495,7 +495,7 @@ function drawMasks(rangeSlider, gd, axisOpts, opts, oppAxisOpts) {
495495
.call(Color.fill, constants.maskColor);
496496

497497
// masks used for oppAxis zoom
498-
if(oppAxisOpts.rangesliderFixedrange) {
498+
if(oppAxisOpts.rangeslidermode) {
499499
var maskMinOppAxis = rangeSlider.selectAll('rect.' + constants.maskMinOppAxisClassName)
500500
.data([0]);
501501

src/plots/cartesian/axes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ axes.doAutoRange = function(ax) {
368368
axIn.autorange = ax.autorange;
369369
}
370370

371-
if(ax.rangesliderFixedrange === 'auto') {
372-
ax.rangesliderRange = hasDeps ? axes.getAutoRange(ax) : ax.range.slice();
371+
if(ax.rangeslidermode === 'auto') {
372+
ax.rangesliderrange = hasDeps ? axes.getAutoRange(ax) : ax.range.slice();
373373
axIn = ax._input;
374-
axIn.rangesliderRange = ax.rangesliderRange.slice();
374+
axIn.rangesliderrange = ax.rangesliderrange.slice();
375375
}
376376
};
377377

src/plots/cartesian/axis_defaults.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
5454
coerce('range');
5555
containerOut.cleanRange();
5656

57-
coerce('rangesliderFixedrange', containerIn.rangesliderRange ?
58-
containerOut.isValidRange(containerIn.rangesliderRange) : 'auto');
57+
coerce('rangeslidermode', containerIn.rangesliderrange ?
58+
containerOut.isValidRange(containerIn.rangesliderrange) : 'auto');
5959

60-
coerce('rangesliderRange');
61-
containerOut.cleanRange('rangesliderRange');
60+
coerce('rangesliderrange');
61+
containerOut.cleanRange('rangesliderrange');
6262

6363
handleCategoryOrderDefaults(containerIn, containerOut, coerce);
6464
containerOut._initialCategories = axType === 'category' ?

src/plots/cartesian/layout_attributes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports = {
128128
'If true, then zoom is disabled.'
129129
].join(' ')
130130
},
131-
rangesliderFixedrange: {
131+
rangeslidermode: {
132132
valType: 'enumerated',
133133
values: ['auto', true, false],
134134
dflt: 'auto',
@@ -139,11 +139,11 @@ module.exports = {
139139
'the rangeslider use the same value than in the main plot',
140140
'when zooming in/out.',
141141
'If *auto*, the autorange will be used.',
142-
'If *true*, the `rangesliderRange` is used.',
142+
'If *true*, the `rangesliderrange` is used.',
143143
'If *false*, the current range is used.'
144144
].join(' ')
145145
},
146-
rangesliderRange: {
146+
rangesliderrange: {
147147
valType: 'info_array',
148148
role: 'style',
149149
items: [

src/plots/gl3d/layout/axis_attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ module.exports = overrideAll({
7878
autorange: axesAttrs.autorange,
7979
rangemode: axesAttrs.rangemode,
8080
range: axesAttrs.range,
81-
rangesliderFixedrange: axesAttrs.rangesliderFixedrange,
82-
rangesliderRange: axesAttrs.rangesliderRange,
81+
rangeslidermode: axesAttrs.rangeslidermode,
82+
rangesliderrange: axesAttrs.rangesliderrange,
8383
// ticks
8484
tickmode: axesAttrs.tickmode,
8585
nticks: axesAttrs.nticks,

0 commit comments

Comments
 (0)