Skip to content

Commit b834e77

Browse files
author
Ruben L
committed
cleanup
1 parent 2403f83 commit b834e77

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

Diff for: VirtualList.svelte

-22
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
export let items;
66
export let height = '100%';
77
export let itemHeight = undefined;
8-
9-
let foo;
10-
118
// read-only, but visible to consumers via bind:start
129
export let start = 0;
1310
export let end = 0;
@@ -109,25 +106,6 @@
109106
while (i < items.length) height_map[i++] = average_height;
110107
bottom = remaining * average_height;
111108
112-
// prevent jumping if we scrolled up into unknown territory
113-
return
114-
if (start < old_start) {
115-
await tick();
116-
117-
let expected_height = 0;
118-
let actual_height = 0;
119-
120-
for (let i = start; i < old_start; i +=1) {
121-
if (rows[i - start]) {
122-
expected_height += height_map[i];
123-
actual_height += itemHeight || rows[i - start].offsetHeight;
124-
}
125-
}
126-
127-
const d = actual_height - expected_height;
128-
viewport.scrollTo(0, scrollTop + d);
129-
}
130-
131109
// TODO if we overestimated the space these
132110
// rows would occupy we may need to add some
133111
// more. maybe we can just call handle_scroll again?

0 commit comments

Comments
 (0)