File tree 1 file changed +0
-22
lines changed
1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 5
5
export let items;
6
6
export let height = ' 100%' ;
7
7
export let itemHeight = undefined ;
8
-
9
- let foo;
10
-
11
8
// read-only, but visible to consumers via bind:start
12
9
export let start = 0 ;
13
10
export let end = 0 ;
109
106
while (i < items .length ) height_map[i++ ] = average_height;
110
107
bottom = remaining * average_height;
111
108
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
-
131
109
// TODO if we overestimated the space these
132
110
// rows would occupy we may need to add some
133
111
// more. maybe we can just call handle_scroll again?
You can’t perform that action at this time.
0 commit comments