Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function scrollToElement(moveNumberToScrollTo: number) {
scroller.scrollTo(moveScrollElementBaseName + moveNumberToScrollTo, {
duration: 300,
smooth: true,
containerId: 'moveList',
// Thanks to this, when scrolling to an element, some elements above it will also be displayed
offset: -250,
});
}