-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ripple): make ripples conform with specs (#2859)
* fix(ripple): make ripples conform with specs This makes the ripple service conform with the specifications and other Material reference implementations. See https://material.io/guidelines/motion/material-motion.html#material-motion-how-does-material-move This means the following: * Ripples now trigger on `mousedown` * Ripples now persists as long as the element is being hold. * No longer adds an unnecessary background ripple. * Removes the ugly `scale(0.00001)` for ripple animations Not only visually the ripple has been changed. The whole renderer has been rewritten and now has a very simple API, that can be easily used by developers. References #1434 * Fix linting and IE11 unsupported error * Ensure style recalculation * Address comments * Address feedback * Document that fade-out duration can't be modified through the speedFactor
- Loading branch information
1 parent
e728771
commit 6381948
Showing
17 changed files
with
357 additions
and
659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<span class="mat-button-wrapper"><ng-content></ng-content></span> | ||
<div md-ripple *ngIf="!_isRippleDisabled()" class="mat-button-ripple" | ||
[class.mat-button-ripple-round]="_isRoundButton()" | ||
[mdRippleTrigger]="_getHostElement()" | ||
[mdRippleColor]="_isRoundButton() ? 'rgba(255, 255, 255, 0.2)' : ''" | ||
mdRippleBackgroundColor="rgba(0, 0, 0, 0)"></div> | ||
[mdRippleTrigger]="_getHostElement()"></div> | ||
<!-- the touchstart handler prevents the overlay from capturing the initial tap on touch devices --> | ||
<div class="mat-button-focus-overlay" (touchstart)="$event.preventDefault()"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<ng-content></ng-content> | ||
<div class="mat-option-ripple" *ngIf="!disabled" md-ripple mdRippleBackgroundColor="rgba(0,0,0,0)" | ||
[mdRippleTrigger]="_getHostElement()"></div> | ||
<div class="mat-option-ripple" *ngIf="!disabled" md-ripple [mdRippleTrigger]="_getHostElement()"> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.