|
|
@ -15080,7 +15080,7 @@ BI.SliderButton = BI.inherit(BI.Widget, { |
|
|
|
BI.shortcut("bi.slider_button", BI.SliderButton);/** |
|
|
|
BI.shortcut("bi.slider_button", BI.SliderButton);/** |
|
|
|
* Created by Urthur on 2017/9/4. |
|
|
|
* Created by Urthur on 2017/9/4. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.Slider = BI.inherit(BI.Widget, { |
|
|
|
BI.SliderNormal = BI.inherit(BI.Widget, { |
|
|
|
_constant: { |
|
|
|
_constant: { |
|
|
|
HEIGHT: 28, |
|
|
|
HEIGHT: 28, |
|
|
|
SLIDER_WIDTH_HALF: 10, |
|
|
|
SLIDER_WIDTH_HALF: 10, |
|
|
@ -15090,7 +15090,7 @@ BI.Slider = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-slider", |
|
|
|
baseCls: "bi-slider", |
|
|
|
min: 10, |
|
|
|
min: 10, |
|
|
|
max: 50 |
|
|
|
max: 50 |
|
|
@ -15098,7 +15098,7 @@ BI.Slider = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
BI.Slider.superclass._init.apply(this, arguments); |
|
|
|
BI.SliderNormal.superclass._init.apply(this, arguments); |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var c = this._constant, o = this.options; |
|
|
|
var c = this._constant, o = this.options; |
|
|
|
this.enable = false; |
|
|
|
this.enable = false; |
|
|
@ -15127,13 +15127,13 @@ BI.Slider = BI.inherit(BI.Widget, { |
|
|
|
var v = self._getValueByPercent(significantPercent); |
|
|
|
var v = self._getValueByPercent(significantPercent); |
|
|
|
self.value = BI.parseInt(v) + 1; |
|
|
|
self.value = BI.parseInt(v) + 1; |
|
|
|
self.slider.setValue(self.getValue()); |
|
|
|
self.slider.setValue(self.getValue()); |
|
|
|
self.fireEvent(BI.Slider.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.SliderNormal.EVENT_CHANGE); |
|
|
|
}, |
|
|
|
}, |
|
|
|
stop: function (e, ui) { |
|
|
|
stop: function (e, ui) { |
|
|
|
var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); |
|
|
|
var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); |
|
|
|
var significantPercent = BI.parseFloat(percent.toFixed(1)); |
|
|
|
var significantPercent = BI.parseFloat(percent.toFixed(1)); |
|
|
|
self._setSliderPosition(significantPercent); |
|
|
|
self._setSliderPosition(significantPercent); |
|
|
|
self.fireEvent(BI.Slider.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.SliderNormal.EVENT_CHANGE); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
var sliderVertical = BI.createWidget({ |
|
|
|
var sliderVertical = BI.createWidget({ |
|
|
@ -15167,7 +15167,7 @@ BI.Slider = BI.inherit(BI.Widget, { |
|
|
|
var v = self._getValueByPercent(significantPercent); |
|
|
|
var v = self._getValueByPercent(significantPercent); |
|
|
|
self.value = BI.parseInt(v); |
|
|
|
self.value = BI.parseInt(v); |
|
|
|
self.slider.setValue(self.getValue()); |
|
|
|
self.slider.setValue(self.getValue()); |
|
|
|
self.fireEvent(BI.Slider.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.SliderNormal.EVENT_CHANGE); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -15276,8 +15276,8 @@ BI.Slider = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
BI.Slider.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
BI.shortcut("bi.slider", BI.Slider);/** |
|
|
|
BI.shortcut("bi.slider", BI.SliderNormal);/** |
|
|
|
* 可以单选多选切换的树 |
|
|
|
* 可以单选多选切换的树 |
|
|
|
* |
|
|
|
* |
|
|
|
* Created by GUY on 2015/12/21. |
|
|
|
* Created by GUY on 2015/12/21. |
|
|
|