lentschi / ngx-ellipsis

Multiline text with ellipsis for angular 9+
MIT License
96 stars 22 forks source link

Provide a way to find out if text overflows and ellipsis presence #40

Closed padu closed 4 years ago

padu commented 4 years ago

Implementing ngx-ellipsis, we came across a requirement to show tooltip on mouse over only when ellipsis are not present or text overflow.

Right now we don't have any way which pragmatically indicate the status of ellipsis presence.

There are multiple ways we can provide this access.

  1. Make isOverflowing method public so that user can access element overflow state using ViewChildren or ViewChild in angular component.
  2. Provide output event emitter that will update flag state to outer component.

This MR is just to make isOverflowing method public as it would create a way for user to check its state from ViewChild instance in angular component.