mirror of
https://gitlab.com/wirelos/sprocket-ui.git
synced 2025-12-14 05:56:50 +01:00
25 lines
520 B
JavaScript
25 lines
520 B
JavaScript
import $ from 'jquery';
|
|
import Component from '../../../core/Component';
|
|
import markup from './Slider.html';
|
|
|
|
export default class Slider extends Component {
|
|
|
|
constructor(ctx, node, template) {
|
|
super(ctx, node, template || markup);
|
|
this.render(this.config);
|
|
}
|
|
|
|
onChange(evt) {}
|
|
|
|
sliderChange(evt) {
|
|
this.value = evt.target.value;
|
|
this.onChange(evt);
|
|
}
|
|
|
|
|
|
subscribe() {
|
|
this.node.delegate('input', 'input',
|
|
this.sliderChange.bind(this));
|
|
}
|
|
|
|
} |