-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Slider component #986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slider component #986
Changes from 1 commit
f5bccd5
83483fd
f69a328
82ea558
ca5f9f5
c6a3e11
5b74652
e13e0ee
8fe1842
05ac586
4604341
8558be8
c673afe
304174a
fce36fa
52b4a2a
b161d55
8d7c40d
30b5f2d
19442d9
ecb7e87
9c0f9ac
2a6f987
5bd6bdd
4520a48
88d6728
6da5b0f
1cad8a4
4a9edd0
6cb6d42
4775a47
a08f084
5816c24
2cfa81b
1d52b51
892583d
5015710
582c643
70610ec
f25127c
4b608ee
6c9034d
21e2f99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,8 +187,50 @@ module.exports = { | |
| }, | ||
| }, | ||
|
|
||
| currentvalue: { | ||
| visible: { | ||
| valType: 'boolean', | ||
| dflt: true, | ||
| description: [ | ||
| 'Shows the currently-selected value above the slider.' | ||
| ].join(' ') | ||
| }, | ||
|
|
||
| xanchor: { | ||
| valType: 'enumerated', | ||
| values: ['left', 'center', 'right'], | ||
| dflt: 'left', | ||
| description: [ | ||
| 'The alignment of the value readout relative to the length of the slider.' | ||
| ].join(' ') | ||
| }, | ||
|
|
||
| offset: { | ||
| valType: 'number', | ||
| dflt: 10, | ||
| role: 'info', | ||
| description: [ | ||
| 'The amount of space, in pixels, between the current value label', | ||
| 'and the slider.' | ||
| ] | ||
| }, | ||
|
|
||
| prefix: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good. Good idea. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ |
||
| valType: 'string', | ||
| role: 'info', | ||
| description: [ | ||
| 'When `currentvalue.visible` is true, this sets the prefix of the lable. If provided,', | ||
| 'it will be joined to the current value with a single space between.' | ||
| ].join(' ') | ||
| }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @etpinard does the Where my browserifying dev environment succeeds: I'm really struggling to find a reason for it. Currently digging into the logic to see if I've committed a crime which would get There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Solved. Problem exists between keyboard, chair, and regex. (previous description lacked |
||
|
|
||
| font: extendFlat({}, fontAttrs, { | ||
| description: 'Sets the font of the current value lable text.' | ||
| }), | ||
| }, | ||
|
|
||
| font: extendFlat({}, fontAttrs, { | ||
| description: 'Sets the font of the slider button text.' | ||
| description: 'Sets the font of the slider step labels.' | ||
| }), | ||
|
|
||
| bgcolor: { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,13 +65,14 @@ function sliderDefaults(sliderIn, sliderOut, layoutOut) { | |
| coerce('pad.b'); | ||
| coerce('pad.l'); | ||
|
|
||
| coerce('currentvalue.visible'); | ||
| coerce('currentvalue.xanchor'); | ||
| coerce('currentvalue.prefix'); | ||
| coerce('currentvalue.offset'); | ||
|
||
|
|
||
| coerce('updateevent'); | ||
| coerce('updatevalue'); | ||
|
|
||
| if(!sliderIn.transition) { | ||
| sliderIn.transition = {}; | ||
| } | ||
|
|
||
| coerce('transition.duration'); | ||
| coerce('transition.easing'); | ||
|
|
||
|
|
@@ -84,6 +85,7 @@ function sliderDefaults(sliderIn, sliderOut, layoutOut) { | |
| } | ||
|
|
||
| Lib.coerceFont(coerce, 'font', layoutOut.font); | ||
| Lib.coerceFont(coerce, 'currentvalue.font', layoutOut.font); | ||
|
|
||
| coerce('bgcolor', layoutOut.paper_bgcolor); | ||
| coerce('bordercolor'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, nice job dropping the
'auto'value here.