Skip to content

Commit 209e4b0

Browse files
committed
Document that fade-out duration can't be modified through the speedFactor
1 parent f972123 commit 209e4b0

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/lib/core/ripple/ripple-renderer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import {ElementRef, NgZone} from '@angular/core';
22
import {ViewportRuler} from '../overlay/position/viewport-ruler';
33

4-
4+
/** Fade-in speed in pixels per second. Can be modified with the speedFactor option. */
55
export const RIPPLE_SPEED_PX_PER_SECOND = 170;
6+
7+
/** Fade-out speed for the ripples in milliseconds. This can't be modified by the speedFactor. */
68
export const RIPPLE_FADE_OUT_DURATION = 600;
79

810
/**

src/lib/core/ripple/ripple.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class MdRipple implements OnChanges, OnDestroy {
5454
/**
5555
* If set, the normal duration of ripple animations is divided by this value. For example,
5656
* setting it to 0.5 will cause the animations to take twice as long.
57+
* A changed speedFactor will not modify the fade-out duration of the ripples.
5758
*/
5859
@Input('mdRippleSpeedFactor') speedFactor: number = 1;
5960

src/lib/radio/radio.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!-- TODO(jelbourn): render the radio on either side of the content -->
22
<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->
3-
<label [attr.for]="inputId" class="mat-radio-label">
3+
<label [attr.for]="inputId" class="mat-radio-label" #label>
44
<!-- The actual 'radio' part of the control. -->
55
<div class="mat-radio-container">
66
<div class="mat-radio-outer-circle"></div>
77
<div class="mat-radio-inner-circle"></div>
8-
<div md-ripple *ngIf="!_isRippleDisabled()" class="mat-radio-ripple"
9-
[mdRippleTrigger]="_getInputElement()"
8+
<div mat-ripple *ngIf="!_isRippleDisabled()" class="mat-radio-ripple"
9+
[mdRippleTrigger]="label"
1010
[mdRippleCentered]="true"
1111
[mdRippleSpeedFactor]="0.3"></div>
1212
</div>

src/lib/radio/radio.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,6 @@ export class MdRadioButton implements OnInit {
503503
}
504504
}
505505
}
506-
507-
_getInputElement() {
508-
return this._inputElement.nativeElement;
509-
}
510506
}
511507

512508

0 commit comments

Comments
 (0)