Files
2026-05-25 12:34:16 +08:00

8 lines
228 B
XML

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