scrollToAsset(asset) ?? false} {timelineManager} {assetInteraction} bind:isShowDeleteConfirmation {onEscape} /> {#if timelineManager.months.length > 0} { evt.preventDefault(); let amount = 50; if (shiftKeyIsDown) { amount = 500; } if (evt.key === 'ArrowUp') { amount = -amount; if (shiftKeyIsDown) { element?.scrollBy({ top: amount, behavior: 'smooth' }); } } else if (evt.key === 'ArrowDown') { element?.scrollBy({ top: amount, behavior: 'smooth' }); } }} /> {/if}
((timelineManager.viewportWidth = v), updateSlidingWindow())} bind:this={element} onscroll={() => (handleTimelineScroll(), updateSlidingWindow(), updateIsScrolling())} >
{@render children?.()} {#if isEmpty} {@render empty?.()} {/if}
{#each timelineManager.months as monthGroup (monthGroup.viewId)} {@const display = monthGroup.intersecting} {@const absoluteHeight = monthGroup.top} {#if !monthGroup.isLoaded}
{:else if display}
{#snippet thumbnail({ asset, position, dayGroup, groupIndex })} {@const isAssetSelectionCandidate = assetInteraction.hasSelectionCandidate(asset.id)} {@const isAssetSelected = assetInteraction.hasSelectedAsset(asset.id) || timelineManager.albumAssets.has(asset.id)} {@const isAssetDisabled = timelineManager.albumAssets.has(asset.id)} { if (typeof onThumbnailClick === 'function') { onThumbnailClick(asset, timelineManager, dayGroup, _onClick); } else { _onClick(timelineManager, dayGroup.getAssets(), dayGroup.groupTitle, asset); } }} onSelect={() => { if (isSelectionMode || assetInteraction.selectionActive) { assetSelectHandler(timelineManager, asset, dayGroup.getAssets(), dayGroup.groupTitle); return; } void onSelectAssets(asset); }} onMouseEvent={() => handleSelectAssetCandidates(asset)} selected={isAssetSelected} selectionCandidate={isAssetSelectionCandidate} disabled={isAssetDisabled} thumbnailWidth={position.width} thumbnailHeight={position.height} /> {/snippet}
{/if} {/each}
{#if $showAssetViewer} {/if}