chore: incorporate renewed appliderFontStore and comparisonStore logic
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
|||||||
unifiedFontStore,
|
unifiedFontStore,
|
||||||
} from '$entities/Font';
|
} from '$entities/Font';
|
||||||
import { FontSampler } from '$features/DisplayFont';
|
import { FontSampler } from '$features/DisplayFont';
|
||||||
|
import { controlManager } from '$features/SetupFont';
|
||||||
|
|
||||||
let text = $state('The quick brown fox jumps over the lazy dog...');
|
let text = $state('The quick brown fox jumps over the lazy dog...');
|
||||||
|
|
||||||
@@ -17,7 +18,10 @@ let text = $state('The quick brown fox jumps over the lazy dog...');
|
|||||||
* Load more fonts by moving to the next page
|
* Load more fonts by moving to the next page
|
||||||
*/
|
*/
|
||||||
function loadMore() {
|
function loadMore() {
|
||||||
if (!unifiedFontStore.pagination.hasMore || unifiedFontStore.isFetching) {
|
if (
|
||||||
|
!unifiedFontStore.pagination.hasMore
|
||||||
|
|| unifiedFontStore.isFetching
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
unifiedFontStore.nextPage();
|
unifiedFontStore.nextPage();
|
||||||
@@ -57,10 +61,12 @@ const displayRange = $derived.by(() => {
|
|||||||
total={unifiedFontStore.pagination.total}
|
total={unifiedFontStore.pagination.total}
|
||||||
onNearBottom={handleNearBottom}
|
onNearBottom={handleNearBottom}
|
||||||
itemHeight={280}
|
itemHeight={280}
|
||||||
|
useWindowScroll={true}
|
||||||
|
weight={controlManager.weight}
|
||||||
>
|
>
|
||||||
{#snippet children({ item: font, isVisible, proximity, index })}
|
{#snippet children({ item: font, isFullyVisible, isPartiallyVisible, proximity, index })}
|
||||||
<FontListItem {font} {isVisible} {proximity}>
|
<FontListItem {font} {isFullyVisible} {isPartiallyVisible} {proximity}>
|
||||||
<FontSampler font={font} bind:text index={index} />
|
<FontSampler {font} bind:text {index} />
|
||||||
</FontListItem>
|
</FontListItem>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</FontVirtualList>
|
</FontVirtualList>
|
||||||
|
|||||||
Reference in New Issue
Block a user