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:
ccd0 2014-04-06 19:17:58 -07:00
parent 711c4587da
commit 5f95bf3e3c
4 changed files with 14 additions and 6 deletions

View File

@ -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() {

View File

@ -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() {

View File

@ -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) ->

View File

@ -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