feat(web): scrubber label and animation ()

* feat(web): scrubber label and animation

* tune x fly in distance

* refactor

* lint and minor fix

* fly height
This commit is contained in:
Alex 2024-10-30 09:38:35 -05:00 committed by GitHub
parent 0d62ff11f1
commit 244c8cb4d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 4 deletions
web/src/lib/components/photos-page

View file

@ -36,6 +36,7 @@
import { page } from '$app/stores';
import type { UpdatePayload } from 'vite';
import { generateId } from '$lib/utils/generate-id';
import { isTimelineScrolling } from '$lib/stores/timeline.store';
export let isSelectionMode = false;
export let singleSelect = false;
@ -331,7 +332,17 @@
}
};
let scrollObserverTimer: NodeJS.Timeout;
const _handleTimelineScroll = () => {
$isTimelineScrolling = true;
if (scrollObserverTimer) {
clearTimeout(scrollObserverTimer);
}
scrollObserverTimer = setTimeout(() => {
$isTimelineScrolling = false;
}, 1000);
leadout = false;
if ($assetStore.timelineHeight < safeViewport.height * 2) {
// edge case - scroll limited due to size of content, must adjust - use the overall percent instead