Files
lingxiao865 c5af079d8c first commit
2026-02-10 08:05:03 +08:00

5 lines
177 B
JavaScript

export function shouldLoadImage(index, currentIndex, loadedIndexes) {
return Math.abs(index - currentIndex) <= 1 || (loadedIndexes && loadedIndexes.indexOf(index) !== -1);
}