From bce9eaeb373c124fc0189302eac72d0da86b1785 Mon Sep 17 00:00:00 2001 From: Ricky Reusser Date: Tue, 11 Oct 2016 17:30:49 -0400 Subject: [PATCH 1/2] Fix a badly set default x value for sliders --- src/components/sliders/attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/sliders/attributes.js b/src/components/sliders/attributes.js index 420287f7ded..9c55d085327 100644 --- a/src/components/sliders/attributes.js +++ b/src/components/sliders/attributes.js @@ -105,7 +105,7 @@ module.exports = { valType: 'number', min: -2, max: 3, - dflt: -0.05, + dflt: 0, role: 'style', description: 'Sets the x position (in normalized coordinates) of the slider.' }, From 2695591f865ee89b2b987f99accd1b89ebdeb499 Mon Sep 17 00:00:00 2001 From: Ricky Reusser Date: Tue, 11 Oct 2016 17:37:53 -0400 Subject: [PATCH 2/2] Fix more slider positioning defaults --- src/components/sliders/attributes.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/sliders/attributes.js b/src/components/sliders/attributes.js index 9c55d085327..8e180421de1 100644 --- a/src/components/sliders/attributes.js +++ b/src/components/sliders/attributes.js @@ -11,6 +11,7 @@ var fontAttrs = require('../../plots/font_attributes'); var padAttrs = require('../../plots/pad_attributes'); var extendFlat = require('../../lib/extend').extendFlat; +var extendDeep = require('../../lib/extend').extendDeep; var animationAttrs = require('../../plots/animation_attributes'); var constants = require('./constants'); @@ -109,9 +110,9 @@ module.exports = { role: 'style', description: 'Sets the x position (in normalized coordinates) of the slider.' }, - pad: extendFlat({}, padAttrs, { + pad: extendDeep({}, padAttrs, { description: 'Set the padding of the slider component along each side.' - }), + }, {t: {dflt: 20}}), xanchor: { valType: 'enumerated', values: ['auto', 'left', 'center', 'right'], @@ -127,14 +128,14 @@ module.exports = { valType: 'number', min: -2, max: 3, - dflt: 1, + dflt: 0, role: 'style', description: 'Sets the y position (in normalized coordinates) of the slider.' }, yanchor: { valType: 'enumerated', values: ['auto', 'top', 'middle', 'bottom'], - dflt: 'bottom', + dflt: 'top', role: 'info', description: [ 'Sets the slider\'s vertical position anchor',