]>
git.proxmox.com Git - extjs.git/blob - extjs/modern/modern/src/field/SingleSlider.js
2 * The slider is a way to allow the user to select a value from a given numerical range. You might use it for choosing
4 Ext
.define('Ext.field.SingleSlider', {
5 extend
: 'Ext.field.Slider',
6 xtype
: 'singlesliderfield',
10 * Fires when the value changes.
11 * @param {Ext.field.Slider} me
12 * @param {Number} newValue The new value.
13 * @param {Number} oldValue The old value.
18 * Fires when the value changes via drag.
19 * @param {Ext.field.Slider} me
20 * @param {Ext.slider.Slider} sl Slider Component.
21 * @param {Number} newValue The new value.
22 * @param {Number} oldValue The old value.
27 * Fires when the slider thumb starts a drag operation.
28 * @param {Ext.field.Slider} this
29 * @param {Ext.slider.Slider} sl Slider Component.
30 * @param {Ext.slider.Thumb} thumb The thumb being dragged.
31 * @param {Array} value The start value.
32 * @param {Ext.event.Event} e
37 * Fires when the slider thumb starts a drag operation.
38 * @param {Ext.field.Slider} this
39 * @param {Ext.slider.Slider} sl Slider Component.
40 * @param {Ext.slider.Thumb} thumb The thumb being dragged.
41 * @param {Ext.event.Event} e
46 * Fires when the slider thumb ends a drag operation.
47 * @param {Ext.field.Slider} this
48 * @param {Ext.slider.Slider} sl Slider Component.
49 * @param {Ext.slider.Thumb} thumb The thumb being dragged.
50 * @param {Array} value The end value.
51 * @param {Ext.event.Event} e
55 * @inheritdoc Ext.slider.Slider#value
60 defaultBindProperty
: 'value',
66 initialize: function() {
68 this.publishState('value', this.getValue());
71 applyValue: function(value
, oldValue
) {
72 value
= this.callParent([value
, oldValue
]);
73 if (value
&& Ext
.isArray(value
)) {
79 getValue: function() {
80 var value
= this.callParent();
81 if (value
&& Ext
.isArray(value
)) {
87 onSliderChange: function(slider
, thumb
, newValue
, oldValue
) {
88 this.setValue(newValue
);
89 this.fireEvent('dragchange', this, slider
, newValue
, oldValue
);
92 onSliderDragStart: function(slider
, thumb
, startValue
, e
) {
93 this.fireEvent('dragstart', this, slider
, startValue
, e
);
96 onSliderDrag: function(slider
, thumb
, value
, e
) {
98 if (me
.getLiveUpdate()) {
101 me
.fireEvent('drag', me
, slider
, value
, e
);
104 onSliderDragEnd: function(slider
, thumb
, startValue
, e
) {
105 this.fireEvent('dragend', this, slider
, startValue
, e
);