react-photostory
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -92,6 +92,10 @@ import React, { Component } from 'react' | ||
const { overScan, children } = this.props | ||
this[`imageRef${currentIndex}`].load() | ||
if (this[`imageRef${currentIndex}`]) { | ||
this[`imageRef${currentIndex}`].load() | ||
} | ||
if (overScan === 1) { | ||
if (currentIndex > 0) this[`imageRef${currentIndex - 1}`].load() | ||
if (currentIndex + 1 < children.length) { | ||
if (currentIndex > 0 && this[`imageRef${currentIndex - 1}`]) { | ||
this[`imageRef${currentIndex - 1}`].load() | ||
} | ||
if ((currentIndex + 1 < children.length) && this[`imageRef${currentIndex + 1}`]) { | ||
this[`imageRef${currentIndex + 1}`].load() | ||
@@ -98,0 +102,0 @@ } |
@@ -137,6 +137,10 @@ 'use strict'; | ||
this['imageRef' + currentIndex].load(); | ||
if (this['imageRef' + currentIndex]) { | ||
this['imageRef' + currentIndex].load(); | ||
} | ||
if (overScan === 1) { | ||
if (currentIndex > 0) this['imageRef' + (currentIndex - 1)].load(); | ||
if (currentIndex + 1 < children.length) { | ||
if (currentIndex > 0 && this['imageRef' + (currentIndex - 1)]) { | ||
this['imageRef' + (currentIndex - 1)].load(); | ||
} | ||
if (currentIndex + 1 < children.length && this['imageRef' + (currentIndex + 1)]) { | ||
this['imageRef' + (currentIndex + 1)].load(); | ||
@@ -143,0 +147,0 @@ } |
@@ -90,3 +90,3 @@ { | ||
}, | ||
"version": "0.7.0" | ||
"version": "0.7.1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44373
1085