diff --git a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue index 59bce73..8f2ee13 100644 --- a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue +++ b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue @@ -766,9 +766,13 @@ function scrollToResult() { if (container) { const containerRect = container.getBoundingClientRect(); const elementRect = lineElement.getBoundingClientRect(); - + // Calculate scroll position to center element in container - const scrollOffset = elementRect.top - containerRect.top - (containerRect.height / 2) + (elementRect.height / 2); + const scrollOffset = + elementRect.top - + containerRect.top - + containerRect.height / 2 + + elementRect.height / 2; container.scrollBy({ top: scrollOffset, behavior: 'smooth' }); } return true;