Improve tooltip position in block overview on mobile

This commit is contained in:
natsoni 2024-04-16 16:02:39 +02:00
parent d9dec44c8f
commit c2d649d3f4
No known key found for this signature in database
GPG Key ID: C65917583181743B
2 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@
class="block-overview-tooltip"
[class.clickable]="clickable"
[style.visibility]="tx ? 'visible' : 'hidden'"
[style.left]="tooltipPosition.x + 'px'"
[style.left]="getTooltipLeftPosition()"
[style.top]="tooltipPosition.y + 'px'"
>
<table class="table-fixed">

View File

@ -96,4 +96,8 @@ export class BlockOverviewTooltipComponent implements OnChanges {
this.cd.markForCheck();
}
}
getTooltipLeftPosition(): string {
return window.innerWidth < 392 ? '-40px' : this.tooltipPosition.x + 'px';
}
}