Skip to content

Commit 0109c9b

Browse files
authored
Merge pull request #1029 from plotly/fix-slider-x-default
Fix badly chosen default positioning for sliders
2 parents d90d4e1 + 2695591 commit 0109c9b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/components/sliders/attributes.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
var fontAttrs = require('../../plots/font_attributes');
1212
var padAttrs = require('../../plots/pad_attributes');
1313
var extendFlat = require('../../lib/extend').extendFlat;
14+
var extendDeep = require('../../lib/extend').extendDeep;
1415
var animationAttrs = require('../../plots/animation_attributes');
1516
var constants = require('./constants');
1617

@@ -105,13 +106,13 @@ module.exports = {
105106
valType: 'number',
106107
min: -2,
107108
max: 3,
108-
dflt: -0.05,
109+
dflt: 0,
109110
role: 'style',
110111
description: 'Sets the x position (in normalized coordinates) of the slider.'
111112
},
112-
pad: extendFlat({}, padAttrs, {
113+
pad: extendDeep({}, padAttrs, {
113114
description: 'Set the padding of the slider component along each side.'
114-
}),
115+
}, {t: {dflt: 20}}),
115116
xanchor: {
116117
valType: 'enumerated',
117118
values: ['auto', 'left', 'center', 'right'],
@@ -127,14 +128,14 @@ module.exports = {
127128
valType: 'number',
128129
min: -2,
129130
max: 3,
130-
dflt: 1,
131+
dflt: 0,
131132
role: 'style',
132133
description: 'Sets the y position (in normalized coordinates) of the slider.'
133134
},
134135
yanchor: {
135136
valType: 'enumerated',
136137
values: ['auto', 'top', 'middle', 'bottom'],
137-
dflt: 'bottom',
138+
dflt: 'top',
138139
role: 'info',
139140
description: [
140141
'Sets the slider\'s vertical position anchor',

0 commit comments

Comments
 (0)