##// END OF EJS Templates
Merge pull request #6171 from tarzzz/slider-value-validate...
Jonathan Frederic -
r17680:eb4529c1 merge
parent child Browse files
Show More
@@ -62,13 +62,25 b' define(['
62 // handle in the vertical slider is always
62 // handle in the vertical slider is always
63 // consistent.
63 // consistent.
64 var orientation = this.model.get('orientation');
64 var orientation = this.model.get('orientation');
65 var value = this.model.get('min');
65 var min = this.model.get('min');
66 this.$slider.slider('option', 'value', value);
66 var max = this.model.get('max');
67 this.$slider.slider('option', 'value', min);
67 this.$slider.slider('option', 'orientation', orientation);
68 this.$slider.slider('option', 'orientation', orientation);
68 value = this.model.get('value');
69 var value = this.model.get('value');
70 if(value > max) {
71 value = max;
72 }
73 else if(value < min){
74 value = min;
75 }
69 this.$slider.slider('option', 'value', value);
76 this.$slider.slider('option', 'value', value);
70 this.$readout.text(value);
77 this.$readout.text(value);
71
78
79 if(this.model.get('value')!=value) {
80 this.model.set('value', value, {updated_view: this});
81 this.touch();
82 }
83
72 // Use the right CSS classes for vertical & horizontal sliders
84 // Use the right CSS classes for vertical & horizontal sliders
73 if (orientation=='vertical') {
85 if (orientation=='vertical') {
74 this.$slider_container
86 this.$slider_container
General Comments 0
You need to be logged in to leave comments. Login now