0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-11 02:23:09 -05:00

fix(web): hide scroll right button when scrolled to the right in memory lane (#16656)

fix(web): hide scroll right button when scrolled to the right
This commit is contained in:
Lukas 2025-03-07 03:50:56 +01:00 committed by GitHub
parent e03d7f888e
commit fdf2331c82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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