mirror of
https://github.com/mempool/mempool.git
synced 2025-02-23 22:46:54 +01:00
Show tooltip on location is truncated
This commit is contained in:
parent
9047cb5998
commit
206edb7613
2 changed files with 12 additions and 1 deletions
|
@ -1 +1,8 @@
|
|||
<span class="d-block text-truncate" [innerHTML]="formattedLocation"></span>
|
||||
<ng-template #formattedLocationHtml>
|
||||
<span [innerHTML]="formattedLocation"></span>
|
||||
</ng-template>
|
||||
|
||||
<span class="d-block text-truncate" [ngbTooltip]="formattedLocationHtml"
|
||||
#formattedLocationEl [disableTooltip]="!isEllipsisActive(formattedLocationEl)">
|
||||
<ng-template [ngTemplateOutlet]="formattedLocationHtml"></ng-template>
|
||||
</span>
|
|
@ -80,4 +80,8 @@ export class GeolocationComponent implements OnChanges {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
isEllipsisActive(e): boolean {
|
||||
return (e.offsetWidth < e.scrollWidth);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue