X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fblazy%2Fjs%2Fblazy.load.js;h=9b13a72f31dc47158610921ab2984c7a51a6a420;hb=2257eb96fa3afedcfba62207e838f49ee9c757e2;hp=2d9836f7ae25771b101229457d4cc3f857865091;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/modules/contrib/blazy/js/blazy.load.js b/web/modules/contrib/blazy/js/blazy.load.js index 2d9836f7a..9b13a72f3 100644 --- a/web/modules/contrib/blazy/js/blazy.load.js +++ b/web/modules/contrib/blazy/js/blazy.load.js @@ -28,6 +28,8 @@ }, clearing: function (el) { + var ie = _db.hasClass(el, 'b-responsive') && el.hasAttribute('data-pfsrc'); + // The .b-lazy element can be attached to IMG, or DIV as CSS background. el.className = el.className.replace(/(\S+)loading/, ''); @@ -43,6 +45,15 @@ wrapEl.className = wrapEl.className.replace(/(\S+)loading/, ''); } }); + + // @todo: Remove when Blazy library fixes this. + // @see http://scottjehl.github.io/picturefill/ + if (window.picturefill && ie) { + window.picturefill({ + reevaluate: true, + elements: [el] + }); + } } }; @@ -103,6 +114,8 @@ // Reacts on resizing. if (!me.done) { + me.init.revalidate(); + _db.resize(function () { me.windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;