Numeric Slider Support by BryonLewis · Pull Request #1285 · Kitware/dive
- models.py updated the attributes for optional
editorobject which can include future visualization options for attributes - Added in the
coloroption for the attribute timeline/filtering tools - Added selection between input box/slider for numeric attributes
AttributesSlider.mp4
| /> | ||
| <div v-if="datatype=== 'number'"> | ||
| <v-radio-group | ||
| :value="editor.type" |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line is causing an error for existing attributes. When you click the edit attribute cog the dialog fails to load and console displays this:

Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, editor probably needs to be checked to see if it exists, editor can be undefined.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| outlined | ||
| :step="editor.range[1]> 1 ? 1 : 0.01" | ||
| type="number" | ||
| label="Upper" |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change label to 'Max'
| outlined | ||
| :step="editor.range[0]> 1 ? 1 : 0.01" | ||
| type="number" | ||
| label="Lower" |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change label to 'Min'
| outlined | ||
| :step="editor.steps> 1 ? 1 : 0.01" | ||
| type="number" | ||
| label="Slider Resolution" |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In would change label to something like 'Slider Step Interval' and the hint to something like 'Slider will increase/decrease by this value'
Comment on lines +165 to +166
| :step="typeSettings.steps ? typeSettings.steps | ||
| : (typeSettings.range[1] - typeSettings.range[0])/2.0" |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment on lines +167 to +168
| :min="typeSettings.range[0]" | ||
| :max="typeSettings.range[1]" |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We either need to make the range required or have a default value
When changing a combobox with an existing value to a slider, the value is lost. Is that behavior we want or would we want the slider positioned at that previous value?
I think that's okay because I can't guarantee that the new range contains the old value. We auto set a range when they swap so that is why the value changes. Ideally this should be set up in the configuration file once and then values are undefined/0 until the user sets them on a specific track/detection attribute.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Great!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters


