using el.videoHeight here does help
The whole thing appears to be a hack, though; we should really be using the image dimensions from the file info.
This commit is contained in:
parent
711c4587da
commit
5f95bf3e3c
@ -7719,7 +7719,9 @@
|
||||
$.after(position, el);
|
||||
}
|
||||
return $.asap((function() {
|
||||
return isVideo || el.naturalHeight;
|
||||
if (isVideo) {
|
||||
return el.videoHeight || el.naturalHeight;
|
||||
}
|
||||
}), function() {
|
||||
return ImageExpand.completeExpand(post);
|
||||
});
|
||||
@ -7967,7 +7969,9 @@
|
||||
latestEvent: e,
|
||||
endEvents: 'mouseout click',
|
||||
asapTest: function() {
|
||||
return isVideo || el.naturalHeight;
|
||||
if (isVideo) {
|
||||
return el.videoHeight || el.naturalHeight;
|
||||
}
|
||||
},
|
||||
noRemove: true,
|
||||
cb: function() {
|
||||
|
||||
@ -7738,7 +7738,9 @@
|
||||
$.after(position, el);
|
||||
}
|
||||
return $.asap((function() {
|
||||
return isVideo || el.naturalHeight;
|
||||
if (isVideo) {
|
||||
return el.videoHeight || el.naturalHeight;
|
||||
}
|
||||
}), function() {
|
||||
return ImageExpand.completeExpand(post);
|
||||
});
|
||||
@ -7975,7 +7977,9 @@
|
||||
latestEvent: e,
|
||||
endEvents: 'mouseout click',
|
||||
asapTest: function() {
|
||||
return isVideo || el.naturalHeight;
|
||||
if (isVideo) {
|
||||
return el.videoHeight || el.naturalHeight;
|
||||
}
|
||||
},
|
||||
noRemove: true,
|
||||
cb: function() {
|
||||
|
||||
@ -117,7 +117,7 @@ ImageExpand =
|
||||
el.src = src or post.file.URL
|
||||
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
||||
$.after position, el unless el is position.nextSibling
|
||||
$.asap (-> isVideo or el.naturalHeight), ->
|
||||
$.asap (-> if isVideo then el.videoHeight or el.naturalHeight), ->
|
||||
ImageExpand.completeExpand post
|
||||
|
||||
completeExpand: (post) ->
|
||||
|
||||
@ -37,7 +37,7 @@ ImageHover =
|
||||
el: el
|
||||
latestEvent: e
|
||||
endEvents: 'mouseout click'
|
||||
asapTest: -> (isVideo or el.naturalHeight)
|
||||
asapTest: -> (if isVideo then el.videoHeight or el.naturalHeight)
|
||||
noRemove: true
|
||||
cb: ->
|
||||
if isVideo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user