From 1af614323ea079d9adba30fda8d4e3778a3f370e Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sat, 5 Apr 2025 23:18:37 +0200 Subject: [PATCH] Fix header background position logic on scroll Updated the header's background position calculation to use string concatenation for `inverseYPos` and introduced dynamic adjustment of `inverseYPos` on scroll. This ensures smoother and more accurate background position updates. --- frontend/src/app/header/header.component.html | 8 +------- frontend/src/app/header/header.component.ts | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/header/header.component.html b/frontend/src/app/header/header.component.html index 0f80c4a..e459f18 100644 --- a/frontend/src/app/header/header.component.html +++ b/frontend/src/app/header/header.component.html @@ -1,12 +1,6 @@ - - - - - -
+ [ngStyle]="{ 'background-image': getBackgroundImage(), 'height': height, 'background-position': 'center ' + inverseYPos + 'px' }">