From c2d649d3f4cbbe17e9aad3a9c4252a0f6687b02a Mon Sep 17 00:00:00 2001 From: natsoni Date: Tue, 16 Apr 2024 16:02:39 +0200 Subject: [PATCH] Improve tooltip position in block overview on mobile --- .../block-overview-tooltip.component.html | 2 +- .../block-overview-tooltip.component.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.html b/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.html index 505171f9d..63e2933d5 100644 --- a/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.html +++ b/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.html @@ -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'" > diff --git a/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.ts b/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.ts index e77dec716..f397928fa 100644 --- a/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.ts +++ b/frontend/src/app/components/block-overview-tooltip/block-overview-tooltip.component.ts @@ -96,4 +96,8 @@ export class BlockOverviewTooltipComponent implements OnChanges { this.cd.markForCheck(); } } + + getTooltipLeftPosition(): string { + return window.innerWidth < 392 ? '-40px' : this.tooltipPosition.x + 'px'; + } }