8 lines
228 B
XML
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,
|
|
};
|