feat(ripple): support animation duration overwrites#9253
Merged
jelbourn merged 1 commit intoJan 24, 2018
Conversation
a9c8487 to
a72537b
Compare
a72537b to
094265c
Compare
jelbourn
reviewed
Jan 11, 2018
| * There are two animation phases with different durations for the ripples. | ||
| */ | ||
| export interface RippleAnimationConfig { | ||
| /** Duration in milliseconds for the enter animation. */ |
Contributor
There was a problem hiding this comment.
Could you expand the comment a bit more to describe what constitutes "enter animation" and "exit animation"?
Contributor
|
@devversion passes Google presubmit, just needs rebase |
0cd5635 to
1230e5e
Compare
Member
Author
|
@jelbourn Done. |
Contributor
|
@devversion can you rebase again? Conflicted with your other PR for radio buttons that got merged first |
* Adds a new option to the ripples that allows developers to have a better control of the animation (all ripples, or even individual ripples). * Deprecates the `matRippleSpeedFactor` in favor of the `matRippleAnimation` binding that accepts a `RippleAnimationConfig`. The configuration is more explicit, clean and not confusing as the `speedFactor`. * To provide a more user-friendly `launch()` method API, the passed ripple config will extend the default ripple config from the `MatRipple` instance (removes unnecessary bloat; requested in angular#4179 (comment)) * Disables ripples for most of the demo buttons in the ripple demo (allows better debugging; when pressing the buttons)
1230e5e to
ea98b5d
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new option to the ripples that allows developers to have a better control of the animation (all ripples, or even individual ripples).
Deprecates the
matRippleSpeedFactorin favor of thematRippleAnimationbinding that accepts aRippleAnimationConfig. The configuration is more explicit, clean and not confusing as thespeedFactor.To provide a more user-friendly
launch()method API, the passed ripple config will extend the default ripple config from theMatRippleinstance (removes unnecessary bloat; requested in Proposal: Provide public access to a button's ripple #4179 (comment))Disables ripples for most of the demo buttons in the ripple demo (allows better debugging; when pressing the buttons)
Text from the ripple overview (Disabling animation)
The animation of ripples can be disabled by using the
animationglobal option. If theenterDurationandexitDurationis being set to0, ripples will just appear without anyanimation.
This is specifically useful in combination with the
disabledglobal option, because globallydisabling ripples won't affect the focus indicator ripples. If someone still wants to disable
those ripples for performance reasons, the duration can be set to
0, to remove the ripple feel.