Merge pull request #4979 from mempool/natsoni/improve-tooltip-positioning
Fix cropped transaction tooltip in block overview on mobile
This commit is contained in:
commit
5e6e2c037e
@ -3,7 +3,7 @@
|
|||||||
class="block-overview-tooltip"
|
class="block-overview-tooltip"
|
||||||
[class.clickable]="clickable"
|
[class.clickable]="clickable"
|
||||||
[style.visibility]="tx ? 'visible' : 'hidden'"
|
[style.visibility]="tx ? 'visible' : 'hidden'"
|
||||||
[style.left]="tooltipPosition.x + 'px'"
|
[style.left]="getTooltipLeftPosition()"
|
||||||
[style.top]="tooltipPosition.y + 'px'"
|
[style.top]="tooltipPosition.y + 'px'"
|
||||||
>
|
>
|
||||||
<table class="table-fixed">
|
<table class="table-fixed">
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
min-width: 340px;
|
min-width: 340px;
|
||||||
max-width: 340px;
|
max-width: 400px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ th, td {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
row-gap: 0.25em;
|
row-gap: 0.25em;
|
||||||
margin-top: 0.2em;
|
margin-top: 0.2em;
|
||||||
max-width: 100%;
|
max-width: 310px;
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem;
|
||||||
|
@ -96,4 +96,8 @@ export class BlockOverviewTooltipComponent implements OnChanges {
|
|||||||
this.cd.markForCheck();
|
this.cd.markForCheck();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTooltipLeftPosition(): string {
|
||||||
|
return window.innerWidth < 392 ? '-50px' : this.tooltipPosition.x + 'px';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user