refac
This commit is contained in:
@@ -466,7 +466,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="relative {className}">
|
||||
<div class="relative {className}">
|
||||
{#if loading}
|
||||
<div class="absolute inset-0 flex items-center justify-center">
|
||||
<Spinner className="size-5" />
|
||||
@@ -477,17 +477,19 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
class={singlePage
|
||||
? 'overflow-hidden h-full flex items-center justify-center overscroll-contain'
|
||||
: 'overflow-y-auto h-full'}
|
||||
bind:this={outerContainer}
|
||||
tabindex="0"
|
||||
on:scroll={handleScroll}
|
||||
on:wheel|nonpassive={handleWheel}
|
||||
on:pointerdown={focusViewer}
|
||||
on:keydown={handleKeyDown}
|
||||
>
|
||||
<div
|
||||
class={singlePage
|
||||
? 'overflow-hidden h-full flex items-center justify-center overscroll-contain'
|
||||
: 'overflow-y-auto h-full'}
|
||||
bind:this={outerContainer}
|
||||
role="region"
|
||||
aria-label={`${itemLabel} viewer`}
|
||||
tabindex="0"
|
||||
on:scroll={handleScroll}
|
||||
on:wheel|nonpassive={handleWheel}
|
||||
on:pointerdown={focusViewer}
|
||||
on:keydown={handleKeyDown}
|
||||
>
|
||||
<div bind:this={sceneElement} class={singlePage ? '' : 'w-full'}></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -231,15 +231,17 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div
|
||||
bind:this={rootEl}
|
||||
tabindex="0"
|
||||
on:keydown={handleKeyDown}
|
||||
on:pointerdown={focusPreview}
|
||||
class="relative grid {hideThumbs
|
||||
? 'grid-cols-[minmax(0,1fr)]'
|
||||
: 'grid-cols-[144px_minmax(0,1fr)]'} min-h-0 bg-transparent text-gray-900 dark:text-gray-100 {className}"
|
||||
>
|
||||
<div
|
||||
bind:this={rootEl}
|
||||
role="region"
|
||||
aria-label={`${itemLabel} preview`}
|
||||
tabindex="0"
|
||||
on:keydown={handleKeyDown}
|
||||
on:pointerdown={focusPreview}
|
||||
class="relative grid {hideThumbs
|
||||
? 'grid-cols-[minmax(0,1fr)]'
|
||||
: 'grid-cols-[144px_minmax(0,1fr)]'} min-h-0 bg-transparent text-gray-900 dark:text-gray-100 {className}"
|
||||
>
|
||||
<aside
|
||||
class={hideThumbs
|
||||
? 'hidden'
|
||||
|
||||
Reference in New Issue
Block a user