js/components/matrix.js
function() {
        var promises = [];

        this.images = this.element.find('img').each(function(index, image) {
            if (image.complete) {
                return; // Already loaded
            }

            var src = image.src,
                def = $.Deferred();

            image.onload = def.resolve;
            image.onerror = image.onabort = def.reject;
            image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
            image.src = src;

            promises.push(def.promise());
        });

        $.when.apply($, promises).always(this.render.bind(this));
    }
function() {
        var promises = [];

        this.images = this.element.find('img').each(function(index, image) {
            if (image.complete) {
                return; // Already loaded
            }

            var src = image.src,
                def = $.Deferred();

            image.onload = def.resolve;
            image.onerror = image.onabort = def.reject;
            image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
            image.src = src;

            promises.push(def.promise());
        });

        $.when.apply($, promises).always(this.render.bind(this));
    }
function ( ) { var promises = [ ] ; this . images = this . element . find ( 'img' ) . each ( function ( index , image ) { if ( image . complete ) { return ; // Already loaded } var src = image . src , def = $ . Deferred ( ) ; image . onload = def . resolve ; image . onerror = image . onabort = def . reject ; image . src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==' ; image . src = src ; promises . push ( def . promise ( ) ) ; } ) ; $ . when . apply ( $ , promises ) . always ( this . render . bind ( this ) ) ; }
Fetch all images within the matrix and attach an onload event.
This will monitor loaded images and render once all are complete.
Uses a src swap trick to force load cached images.

@private
Fetch all images within the matrix and attach an onload event . This will monitor loaded images and render once all are complete . Uses a src swap trick to force load cached images .