slider.js
2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Ext.require('Ext.slider.*');
Ext.onReady(function(){
Ext.create('Ext.slider.Single', {
renderTo: 'basic-slider',
width: 214,
minValue: 0,
hideLabel: true,
useTips: false,
maxValue: 100
});
Ext.create('Ext.slider.Single', {
renderTo: 'increment-slider',
hideLabel: true,
useTips: false,
width: 214,
value:50,
increment: 10,
minValue: 0,
maxValue: 100
});
// This Should allow values 65, 67, 69, 71, 73 and 75
// The initial value of 66 should get normalized to 67
// The max value of 74 will also be normalized to 75.
Ext.create('Ext.slider.Single', {
renderTo: 'increment-slider-minValue',
hideLabel: true,
width: 214,
value: 66,
increment: 2,
minValue: 65,
maxValue: 74
});
Ext.create('Ext.slider.Single', {
renderTo: 'vertical-slider',
hideLabel: true,
useTips: false,
height: 214,
vertical: true,
minValue: 0,
maxValue: 100
});
Ext.create('Ext.slider.Single', {
renderTo: 'tip-slider',
hideLabel: true,
width: 214,
minValue: 0,
maxValue: 100
});
Ext.create('Ext.slider.Single', {
renderTo: 'custom-tip-slider',
hideLabel: true,
width: 214,
increment: 10,
minValue: 0,
maxValue: 100,
tipText: function(thumb){
return Ext.String.format('<b>{0}% complete</b>', thumb.value);
}
});
Ext.create('Ext.slider.Single', {
renderTo: 'custom-slider',
hideLabel: true,
width: 214,
increment: 10,
minValue: 0,
maxValue: 100
});
Ext.create('Ext.slider.Multi', {
renderTo: 'multi-slider-horizontal',
hideLabel: true,
width: 214,
minValue: 0,
maxValue: 100,
values: [10, 50, 90]
});
Ext.create('Ext.slider.Multi', {
renderTo: 'multi-slider-vertical',
hideLabel: true,
vertical: true,
height: 214,
minValue: 0,
maxValue: 100,
values: [10, 50, 90]
});
});