Skip to content

Commit

Permalink
Document that fade-out duration can't be modified through the speedFa…
Browse files Browse the repository at this point in the history
…ctor
  • Loading branch information
devversion committed Feb 9, 2017
1 parent f972123 commit 209e4b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/lib/core/ripple/ripple-renderer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import {ElementRef, NgZone} from '@angular/core';
import {ViewportRuler} from '../overlay/position/viewport-ruler';


/** Fade-in speed in pixels per second. Can be modified with the speedFactor option. */
export const RIPPLE_SPEED_PX_PER_SECOND = 170;

/** Fade-out speed for the ripples in milliseconds. This can't be modified by the speedFactor. */
export const RIPPLE_FADE_OUT_DURATION = 600;

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

Expand Down
6 changes: 3 additions & 3 deletions src/lib/radio/radio.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- TODO(jelbourn): render the radio on either side of the content -->
<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->
<label [attr.for]="inputId" class="mat-radio-label">
<label [attr.for]="inputId" class="mat-radio-label" #label>
<!-- The actual 'radio' part of the control. -->
<div class="mat-radio-container">
<div class="mat-radio-outer-circle"></div>
<div class="mat-radio-inner-circle"></div>
<div md-ripple *ngIf="!_isRippleDisabled()" class="mat-radio-ripple"
[mdRippleTrigger]="_getInputElement()"
<div mat-ripple *ngIf="!_isRippleDisabled()" class="mat-radio-ripple"
[mdRippleTrigger]="label"
[mdRippleCentered]="true"
[mdRippleSpeedFactor]="0.3"></div>
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,6 @@ export class MdRadioButton implements OnInit {
}
}
}

_getInputElement() {
return this._inputElement.nativeElement;
}
}


Expand Down

0 comments on commit 209e4b0

Please sign in to comment.