calculate
Commons
stable
Compute the position (centerX, centerY), radius, and initial scale of a ripple effect from a pointer or keyboard event on a target element.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- erequisTRippleEvent
- The triggering event (MouseEvent, TouchEvent, or KeyboardEvent). Keyboard events produce a centered ripple.
- elrequisIRippleHtmlElement
- The host element extended with ripple state (_ripple). Used to obtain dimensions and configuration.
- valueIRippleOptions{}
- Optional ripple options (center flag, circle mode). When center is true, the ripple always originates from the element center.
API
Valeur de retour
La valeur retournée par cet util.
- Geometry values used to position and size the ripple pseudo-element via CSS custom properties.
Usage
Exemples
Extraits de code prêts à coller.
Calculate ripple geometry from a click