StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
666 B
34 lines
666 B
4 years ago
|
import props from './properties'
|
||
|
|
||
|
const ignoreProps = [
|
||
|
'triggerSlideEvent',
|
||
|
'triggerChangeEvent',
|
||
|
'debounce'
|
||
|
]
|
||
|
|
||
|
const watchers = {
|
||
|
disabled(value) {
|
||
|
if (value) {
|
||
|
this.slider.disable()
|
||
|
} else {
|
||
|
this.slider.enable()
|
||
|
}
|
||
|
},
|
||
|
value(value) {
|
||
|
this.slider.setValue(value, this.triggerSlideEvent, this.triggerChangeEvent)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Object.keys(props).forEach((prop) => {
|
||
|
if (!watchers[prop] && !ignoreProps.includes(prop)) {
|
||
|
watchers[prop] = function (value, oldValue) {
|
||
|
if (this.slider && value !== oldValue) {
|
||
|
this.slider.setAttribute(prop, value)
|
||
|
this.refresh()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
|
||
|
export default watchers
|