|
|
|
@ -26,7 +26,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
beforeMount: function () { |
|
|
|
|
const { value, min, max } = this.options; |
|
|
|
|
this.setMinAndMax({ |
|
|
|
|
this._setMinAndMax({ |
|
|
|
|
min, |
|
|
|
|
max, |
|
|
|
|
}); |
|
|
|
@ -260,12 +260,12 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
|
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
el: this.sliderOne, |
|
|
|
|
top: 1, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
left: 0 |
|
|
|
|
}, { |
|
|
|
|
el: this.sliderTwo, |
|
|
|
|
top: 1, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
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 maxNumber = BI.parseFloat(v.max); |
|
|
|
|
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) { |
|
|
|
|
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber)) { |
|
|
|
|
this.min = minNumber; |
|
|
|
|
this.max = maxNumber; |
|
|
|
|
this.valueOne = minNumber; |
|
|
|
|
this.valueTwo = maxNumber; |
|
|
|
|
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) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var valueOne = BI.parseFloat(v.min); |
|
|
|
|