|
|
|
@ -56,10 +56,17 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
}); |
|
|
|
|
this._draggable(this.slider); |
|
|
|
|
var sliderVertical = BI.createWidget({ |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
columnSize: ["fill"], |
|
|
|
|
items: [{ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [this.slider] |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
el: this.slider, |
|
|
|
|
top: 8, |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
height: c.SLIDER_HEIGHT |
|
|
|
|
}], |
|
|
|
|
hgap: c.SLIDER_WIDTH_HALF, |
|
|
|
|
height: c.SLIDER_HEIGHT |
|
|
|
@ -171,7 +178,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE); |
|
|
|
|
}, window); |
|
|
|
|
widget.element.on("mousedown", function (event) { |
|
|
|
|
if(!widget.isEnabled()) { |
|
|
|
|
if (!widget.isEnabled()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
defaultSize = this.offsetLeft; |
|
|
|
@ -179,7 +186,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
mouseMoveTracker.captureMouseMoves(event); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function optimizeSize (s) { |
|
|
|
|
function optimizeSize(s) { |
|
|
|
|
return BI.clamp(s, 0, self._getGrayTrackLength()); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -219,7 +226,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setBlueTrack: function (percent) { |
|
|
|
|
this.blueTrack.element.css({width: percent + "%"}); |
|
|
|
|
this.blueTrack.element.css({ width: percent + "%" }); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setLabelPosition: function (percent) { |
|
|
|
@ -227,7 +234,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setSliderPosition: function (percent) { |
|
|
|
|
this.slider.element.css({left: percent + "%"}); |
|
|
|
|
this.slider.element.css({ left: percent + "%" }); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setAllPosition: function (percent) { |
|
|
|
@ -256,7 +263,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
_setEnable: function (b) { |
|
|
|
|
BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]); |
|
|
|
|
if(b) { |
|
|
|
|
if (b) { |
|
|
|
|
this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"); |
|
|
|
|
} else { |
|
|
|
|
this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track"); |
|
|
|
@ -287,7 +294,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Single, {
|
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|