|
|
@ -26,7 +26,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
beforeMount: function () { |
|
|
|
beforeMount: function () { |
|
|
|
const { value, min, max } = this.options; |
|
|
|
const { value, min, max } = this.options; |
|
|
|
this.setMinAndMax({ |
|
|
|
this._setMinAndMax({ |
|
|
|
min, |
|
|
|
min, |
|
|
|
max, |
|
|
|
max, |
|
|
|
}); |
|
|
|
}); |
|
|
@ -260,12 +260,12 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
el: this.sliderOne, |
|
|
|
el: this.sliderOne, |
|
|
|
top: 1, |
|
|
|
top: 0, |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
left: 0 |
|
|
|
left: 0 |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
el: this.sliderTwo, |
|
|
|
el: this.sliderTwo, |
|
|
|
top: 1, |
|
|
|
top: 0, |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
left: "100%" |
|
|
|
left: "100%" |
|
|
|
} |
|
|
|
} |
|
|
@ -487,22 +487,23 @@ BI.IntervalSlider = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setMinAndMax: function (v) { |
|
|
|
_setMinAndMax: function (v) { |
|
|
|
var minNumber = BI.parseFloat(v.min); |
|
|
|
var minNumber = BI.parseFloat(v.min); |
|
|
|
var maxNumber = BI.parseFloat(v.max); |
|
|
|
var maxNumber = BI.parseFloat(v.max); |
|
|
|
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) { |
|
|
|
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber)) { |
|
|
|
this.min = minNumber; |
|
|
|
this.min = minNumber; |
|
|
|
this.max = maxNumber; |
|
|
|
this.max = maxNumber; |
|
|
|
this.valueOne = minNumber; |
|
|
|
this.valueOne = minNumber; |
|
|
|
this.valueTwo = maxNumber; |
|
|
|
this.valueTwo = maxNumber; |
|
|
|
this.precision = this._getPrecision(); |
|
|
|
this.precision = this._getPrecision(); |
|
|
|
this.setEnable(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (maxNumber === minNumber) { |
|
|
|
|
|
|
|
this.setEnable(false); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setMinAndMax: function (v) { |
|
|
|
|
|
|
|
this._setMinAndMax(v); |
|
|
|
|
|
|
|
this.setEnable(v.min <= v.max); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var valueOne = BI.parseFloat(v.min); |
|
|
|
var valueOne = BI.parseFloat(v.min); |
|
|
|