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:
parent
e03d7f888e
commit
fdf2331c82
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue