File tree Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ $range-ios-slider-height: 42px !default;
12
12
$range-ios-hit-width : 42px !default ;
13
13
$range-ios-hit-height : $range-ios-slider-height !default ;
14
14
15
- $range-ios-bar-height : 1 px !default ;
15
+ $range-ios-bar-height : 2 px !default ;
16
16
$range-ios-bar-background-color : #bdbdbd !default ;
17
17
$range-ios-bar-active-background-color : color ($colors-ios , primary ) !default ;
18
18
@@ -67,6 +67,8 @@ ion-range {
67
67
width : 100% ;
68
68
height : $range-ios-bar-height ;
69
69
70
+ border-radius : 1px ;
71
+
70
72
background : $range-ios-bar-background-color ;
71
73
72
74
pointer-events : none ;
@@ -166,6 +168,11 @@ ion-range {
166
168
transform : translate3d (0 , 0 , 0 ) scale (1 );
167
169
}
168
170
171
+ .range-disabled {
172
+ opacity : 0.5 ;
173
+ }
174
+
175
+
169
176
// Generate iOS Range Colors
170
177
// --------------------------------------------------
171
178
Original file line number Diff line number Diff line change @@ -220,6 +220,19 @@ ion-range:not(.range-has-pin) .range-knob-pressed .range-knob {
220
220
221
221
@include md-range-min ();
222
222
223
+ .range-disabled {
224
+ .range-bar-active {
225
+ background-color : $range-md-bar-background-color ;
226
+ }
227
+
228
+ .range-knob {
229
+ transform : scale (.55 );
230
+ background-color : $range-md-bar-background-color ;
231
+ outline : 5px solid white ;
232
+ }
233
+
234
+ }
235
+
223
236
224
237
// Generate Material Design Range Colors
225
238
// --------------------------------------------------
Original file line number Diff line number Diff line change @@ -356,6 +356,12 @@ export class Range {
356
356
* @private
357
357
*/
358
358
pointerDown ( ev : UIEvent ) {
359
+ // TODO: we could stop listening for events instead of checking this._disabled.
360
+ // since there are a lot of events involved, this solution is
361
+ // enough for the moment
362
+ if ( this . _disabled ) {
363
+ return ;
364
+ }
359
365
console . debug ( `range, ${ ev . type } ` ) ;
360
366
361
367
// prevent default so scrolling does not happen
Original file line number Diff line number Diff line change 43
43
</ ion-range >
44
44
</ ion-item >
45
45
46
+ < ion-item >
47
+ < ion-label > disabled</ ion-label >
48
+ < ion-range min ="20 " max ="80 " step ="2 " [(ngModel)] ="singleValue3 " disabled =true >
49
+ < ion-icon small range-left name ="sunny "> </ ion-icon >
50
+ < ion-icon range-right name ="sunny "> </ ion-icon >
51
+ </ ion-range >
52
+ </ ion-item >
53
+
46
54
< ion-item >
47
55
< ion-label > step=100, snaps, {{singleValue4}}</ ion-label >
48
56
< ion-range min ="1000 " max ="2000 " step ="100 " snaps ="true " secondary [(ngModel)] ="singleValue4 "> </ ion-range >
You can’t perform that action at this time.
0 commit comments