From 3dc5565df579c75b1d53c23077439d1bd2cf3317 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Wed, 28 Jan 2026 21:14:16 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Simplify=20scroll=20position=20c?= =?UTF-8?q?alculation=20formatting=20in=20GamemasterExplorer=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websites/pokedex.online/src/views/GamemasterExplorer.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue index 53396ad..d0e2a7c 100644 --- a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue +++ b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue @@ -768,9 +768,10 @@ function scrollToResult() { const elementOffsetTop = lineElement.offsetTop; const containerHeight = container.clientHeight; const elementHeight = lineElement.offsetHeight; - + // Calculate scroll position to center element in container - const scrollTo = elementOffsetTop - (containerHeight / 2) + (elementHeight / 2); + const scrollTo = + elementOffsetTop - containerHeight / 2 + elementHeight / 2; container.scrollTo({ top: scrollTo, behavior: 'smooth' }); } return true;