[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Optimize VirtualListBlock

Kasper (Sep 7, 2024, 7:16 PM +0200) 351e221d 9ce06e7e

+3 -3
+3 -3
src/components/VirtualListBlock.svelte
··· 7 7 export let get_key: (item: T, i: number) => number | string 8 8 export let buffer = 5 9 9 10 + $: height = items.length * item_height 11 + $: buffer_height = buffer * item_height 12 + 10 13 let main_element: HTMLDivElement 11 14 let start_pixel = 0 12 15 let start_index = 0 ··· 18 21 } 19 22 20 23 function refresh() { 21 - const height = items.length * item_height 22 - const buffer_height = buffer * item_height 23 - 24 24 const element_top = main_element.offsetTop 25 25 const element_bottom = element_top + height 26 26