mirror of
https://github.com/immich-app/immich.git
synced 2025-06-01 20:54:22 -04: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:
parent
e03d7f888e
commit
fdf2331c82
@ -27,7 +27,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let canScrollLeft = $derived(scrollLeftPosition > 0);
|
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 scrollBy = 400;
|
||||||
const scrollLeft = () => memoryLaneElement?.scrollBy({ left: -scrollBy, behavior: 'smooth' });
|
const scrollLeft = () => memoryLaneElement?.scrollBy({ left: -scrollBy, behavior: 'smooth' });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user