material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.15k stars 2.15k forks source link

[MDCRipple] only listen to resize events if oblong #5578

Open asyncLiz opened 4 years ago

asyncLiz commented 4 years ago

Feature Request

MDCRipple currently listens to window resize events to re-layout if unbounded. This is not necessary if the ripple is a perfect circle, which all current unbounded ripples are.

Proposed solution

Add a new property, oblong, to indicate that an unbounded ripple is not a perfect circle. The ripple should only register/deregister resize handlers if both unbounded and oblong.

asyncLiz commented 4 years ago

Additionally, when calling setUnbounded(), or the new setOblong(), the ripple should register/deregister resize listeners appropriately.