Skip to content

Commit 8ea20e4

Browse files
devversionmmalerba
authored andcommitted
docs: clarify coordinate parameters for MatRipple.launch method. (#22806)
It was never clearly specified whether the coordinates for `MatRipple.launch` should be relative to the trigger, ripple container or viewport, or even absolute. This commit clarifies this by explicitly mentioning the viewport. Fixes #16613. (cherry picked from commit 3462c22)
1 parent dcf0694 commit 8ea20e4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/material/core/ripple/ripple.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ export class MatRipple implements OnInit, OnDestroy, RippleTarget {
189189
launch(config: RippleConfig): RippleRef;
190190

191191
/**
192-
* Launches a manual ripple at the specified coordinates within the element.
193-
* @param x Coordinate within the element, along the X axis at which to fade-in the ripple.
194-
* @param y Coordinate within the element, along the Y axis at which to fade-in the ripple.
192+
* Launches a manual ripple at the specified coordinates relative to the viewport.
193+
* @param x Coordinate along the X axis at which to fade-in the ripple. Coordinate
194+
* should be relative to the viewport.
195+
* @param y Coordinate along the Y axis at which to fade-in the ripple. Coordinate
196+
* should be relative to the viewport.
195197
* @param config Optional ripple configuration for the manual ripple.
196198
*/
197199
launch(x: number, y: number, config?: RippleConfig): RippleRef;

0 commit comments

Comments
 (0)