docs(ripple): mention terminateOnPointerUp option (#9825)

* Explains what the `terminateOnPointerUp` ripple option is doing, and how it can be specified.
This commit is contained in:
Paul Gschwendtner
2018-02-08 22:46:25 +01:00
committed by mmalerba
parent 64ce0c4b96
commit 591d1f28bb
+19
View File
@@ -109,3 +109,22 @@ const globalRippleConfig: RippleGlobalOptions = {
}
};
```
### Animation behavior
There are two different animation behaviors for the fade-out of ripples shown in the Material
Design specifications.
By default, all ripples will start fading out if the mouse or touch is released and the enter
animation completed. The second possible behavior, which is also shown in the specifications, is
that ripples start to fade out immediately on mouse or touch release.
In some scenarios, developers might prefer that behavior over the default and would like to have
the same for Angular Material. This behavior can be activated by specifying the
`terminateOnPointerUp` global ripple option.
```ts
const globalRippleConfig: RippleGlobalOptions = {
terminateOnPointerUp: true
};
```