Fix image expanding.
This commit is contained in:
parent
8edd4d5e64
commit
fa5f51f1df
@ -5139,7 +5139,7 @@
|
||||
}
|
||||
thumb.hidden = true;
|
||||
$.addClass(thumb.parentNode.parentNode.parentNode, 'image_expanded');
|
||||
if (img = thumb.nextSibling) {
|
||||
if ((img = thumb.nextSibling) && img.nodeName === 'IMG') {
|
||||
img.hidden = false;
|
||||
return;
|
||||
}
|
||||
@ -5147,7 +5147,7 @@
|
||||
src: src
|
||||
});
|
||||
$.on(img, 'error', ImageExpand.error);
|
||||
return $.add(a, img);
|
||||
return $.after(thumb, img);
|
||||
},
|
||||
error: function() {
|
||||
var src, thumb, timeoutID, url;
|
||||
|
||||
@ -4152,13 +4152,13 @@ ImageExpand =
|
||||
return if /\.pdf$/.test src
|
||||
thumb.hidden = true
|
||||
$.addClass thumb.parentNode.parentNode.parentNode, 'image_expanded'
|
||||
if img = thumb.nextSibling
|
||||
if (img = thumb.nextSibling) && img.nodeName is 'IMG'
|
||||
# Expand already loaded picture
|
||||
img.hidden = false
|
||||
return
|
||||
img = $.el 'img', { src }
|
||||
$.on img, 'error', ImageExpand.error
|
||||
$.add a, img
|
||||
$.after thumb, img
|
||||
|
||||
error: ->
|
||||
thumb = @previousSibling
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user