Fix bug in scrollChange
parent
df0edfb02d
commit
5711d18314
|
@ -362,13 +362,18 @@ export default {
|
||||||
const end = Math.min(endIndex, this.currentEnd);
|
const end = Math.min(endIndex, this.currentEnd);
|
||||||
|
|
||||||
if (end - start > 0) {
|
if (end - start > 0) {
|
||||||
this.loadScrollChanges(startIndex, endIndex);
|
this.loadScrollChanges(start, end);
|
||||||
}
|
}
|
||||||
}, SCROLL_LOAD_DELAY);
|
}, SCROLL_LOAD_DELAY);
|
||||||
},
|
},
|
||||||
|
|
||||||
/** Load image data for given view */
|
/** Load image data for given view */
|
||||||
loadScrollChanges(startIndex, endIndex) {
|
loadScrollChanges(startIndex, endIndex) {
|
||||||
|
// Make sure start and end valid
|
||||||
|
startIndex = Math.max(0, startIndex);
|
||||||
|
endIndex = Math.min(this.list.length - 1, endIndex);
|
||||||
|
|
||||||
|
// Fetch all visible days
|
||||||
for (let i = startIndex; i <= endIndex; i++) {
|
for (let i = startIndex; i <= endIndex; i++) {
|
||||||
let item = this.list[i];
|
let item = this.list[i];
|
||||||
if (!item) {
|
if (!item) {
|
||||||
|
|
Loading…
Reference in New Issue