Merge pull request #2509 from mempool/nymkappa/bugfix/location-hover
Show tooltip on location is truncated
This commit is contained in:
		
						commit
						0a645431ae
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user