Fix expose view loading for the first time always shows loading icon

This commit is contained in:
Hadi Nategh 2015-01-30 09:30:06 +00:00
parent 21af57059d
commit b193dc0733

View File

@ -134,9 +134,11 @@ function expose (widget)
// Don't bother with adding a default, we just did that // Don't bother with adding a default, we just did that
if(image.loading) if(image.loading)
{ {
$j(gallery.slides[index]) //Add load class if it's really a slide with error
.addClass(gallery.options.slideLoadingClass) if (gallery.slidesContainer.find('[data-index="'+index+'"]').hasClass(gallery.options.slideErrorClass))
.removeClass(gallery.options.slideErrorClass); $j(gallery.slides[index])
.addClass(gallery.options.slideLoadingClass)
.removeClass(gallery.options.slideErrorClass);
return; return;
} }