Nieuw lid |
|
Ik heb volgende imageload functie uit een slideshow en nu wil ik de vertical images niet geladen hebben hoe kan ik dit het beste aanpassen.
M.v.g. Arjan
loadImages: function(sources) {
var self = this;
this.reset();
this.images = [];
this.sources = sources;
this.timer = setInterval(this.loadProgress.bind(this), 100);
for(var i = 0, j = sources.length; i < j; i++) {
this.images[i] = new Asset.image((this.sources[i].path || this.options.path) + this.sources[i].file, {
title: self.sources[i].title,
alt: self.sources[i].desc,
'onload' : function(){ self.index++; },
'onerror' : function(){ self.index++; self.images.splice(i,1); },
'onabort' : function(){ self.index++; self.images.splice(i,1); }
});
this.width=self.images[i].width;
this.height=self.images[i].height;
if (this.width < this.height)
{
return;
}
}
}
loadImages: function(sources) { var self = this; this.images = []; this.sources = sources; this.timer = setInterval(this.loadProgress.bind(this), 100); for(var i = 0, j = sources.length; i < j; i++) { this .images [i ] = new Asset .image ((this .sources [i ].path || this .options .path ) + this .sources [i ].file, { title: self.sources[i].title, alt: self.sources[i].desc, 'onload' : function(){ self.index++; }, 'onerror' : function(){ self.index++; self.images.splice(i,1); }, 'onabort' : function(){ self.index++; self.images.splice(i,1); } }); this.width=self.images[i].width; this.height=self.images[i].height; if (this.width < this.height) { return; } } }
|