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;