fix(web): hide memory lane navigation properly on scaled resolutions (#2819)

Fixes: #2817
This commit is contained in:
Thomas 2023-06-16 19:55:11 +01:00 committed by GitHub
parent 66ee065c0c
commit 61d74263d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@
const onScroll = () => (scrollLeftPosition = memoryLaneElement?.scrollLeft);
$: canScrollLeft = scrollLeftPosition > 0;
$: canScrollRight = scrollLeftPosition < innerWidth - offsetWidth;
$: canScrollRight = Math.ceil(scrollLeftPosition) < innerWidth - offsetWidth;
const scrollBy = 400;
const scrollLeft = () => memoryLaneElement.scrollBy({ left: -scrollBy, behavior: 'smooth' });