Skip to content

Commit

Permalink
4.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Apr 22, 2019
1 parent a93afaa commit bc7d258
Show file tree
Hide file tree
Showing 28 changed files with 43 additions and 31 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## next

* Added the class `ls-is-cached` to already cached images.
* Added h descriptor parsing fix plugin for MS edge (was already included in respimg polyfill.)
* Effects-Plugin/Blur Up plugin: Remove [].find because IE..., fixes [#631](https://github.com/aFarkas/lazysizes/issues/631)
* Documentation stuff
* Bring back *.min.js files to npm package, but don't use them in your `import`/`require`. These are mostly for CDNs. Not for Common JS bundlers.
Expand Down
7 changes: 6 additions & 1 deletion lazysizes-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,12 @@

rAF(function(){
// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)
if( !firesLoad || (elem.complete && elem.naturalWidth > 1)){
var isLoaded = elem.complete && elem.naturalWidth > 1;

if( !firesLoad || isLoaded){
if (isLoaded) {
addClass(elem, 'ls-is-cached');
}
switchLoadingClass(event);
elem._lazyCache = true;
setTimeout(function(){
Expand Down
4 changes: 2 additions & 2 deletions lazysizes-umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion lazysizes.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,12 @@

rAF(function(){
// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)
if( !firesLoad || (elem.complete && elem.naturalWidth > 1)){
var isLoaded = elem.complete && elem.naturalWidth > 1;

if( !firesLoad || isLoaded){
if (isLoaded) {
addClass(elem, 'ls-is-cached');
}
switchLoadingClass(event);
elem._lazyCache = true;
setTimeout(function(){
Expand Down
Loading

0 comments on commit bc7d258

Please sign in to comment.