@@ -32,6 +32,7 @@ import {
32
32
mixinColor ,
33
33
mixinDisabled ,
34
34
mixinDisableRipple ,
35
+ RippleConfig ,
35
36
RippleRenderer ,
36
37
RippleTarget ,
37
38
} from '@angular/material/core' ;
@@ -132,7 +133,7 @@ const _MatChipMixinBase: CanColorCtor & CanDisableRippleCtor & CanDisableCtor &
132
133
'[class.mat-chip-selected]' : 'selected' ,
133
134
} ,
134
135
} )
135
- export class MatChip extends _MatChipMixinBase implements AfterContentInit , AfterViewInit , CanColor , CanDisable , CanDisableRipple , OnDestroy {
136
+ export class MatChip extends _MatChipMixinBase implements AfterContentInit , AfterViewInit , CanColor , CanDisable , CanDisableRipple , RippleTarget , OnDestroy {
136
137
/** Whether the chip has focus. */
137
138
_hasFocus : boolean = false ;
138
139
@@ -194,6 +195,21 @@ export class MatChip extends _MatChipMixinBase implements AfterContentInit, Afte
194
195
/** The ripple renderer for this chip. */
195
196
private _rippleRenderer : RippleRenderer ;
196
197
198
+ rippleConfig : RippleConfig = {
199
+ animation : {
200
+ enterDuration : 225 /* MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS */ ,
201
+ exitDuration : 150 /* MDCRippleFoundation.numbers.FG_DEACTIVATION_MS */ ,
202
+ }
203
+ } ;
204
+
205
+ /**
206
+ * Whether ripples are disabled on interaction
207
+ * INTERNAL USE ONLY.
208
+ */
209
+ get rippleDisabled ( ) : boolean {
210
+ return this . disabled || this . disableRipple || this . _isBasicChip ( ) ;
211
+ }
212
+
197
213
/** Whether the chip list is selectable */
198
214
chipListSelectable : boolean = true ;
199
215
@@ -311,18 +327,8 @@ export class MatChip extends _MatChipMixinBase implements AfterContentInit, Afte
311
327
312
328
/** Initializes the ripple renderer. */
313
329
private _initRipple ( ) {
314
- const rippleTarget : RippleTarget = {
315
- rippleConfig : {
316
- animation : {
317
- enterDuration : 225 /* MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS */ ,
318
- exitDuration : 150 /* MDCRippleFoundation.numbers.FG_DEACTIVATION_MS */ ,
319
- } ,
320
- } ,
321
- rippleDisabled : this . disabled || this . _isBasicChip ( ) ,
322
- } ;
323
-
324
330
this . _rippleRenderer =
325
- new RippleRenderer ( rippleTarget , this . _ngZone , this . _mdcChip , this . _platform ) ;
331
+ new RippleRenderer ( this , this . _ngZone , this . _mdcChip , this . _platform ) ;
326
332
this . _rippleRenderer . setupTriggerEvents ( this . _mdcChip . nativeElement ) ;
327
333
}
328
334
0 commit comments