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);
|
$.after(position, el);
|
||||||
}
|
}
|
||||||
return $.asap((function() {
|
return $.asap((function() {
|
||||||
return isVideo || el.naturalHeight;
|
if (isVideo) {
|
||||||
|
return el.videoHeight || el.naturalHeight;
|
||||||
|
}
|
||||||
}), function() {
|
}), function() {
|
||||||
return ImageExpand.completeExpand(post);
|
return ImageExpand.completeExpand(post);
|
||||||
});
|
});
|
||||||
@ -7967,7 +7969,9 @@
|
|||||||
latestEvent: e,
|
latestEvent: e,
|
||||||
endEvents: 'mouseout click',
|
endEvents: 'mouseout click',
|
||||||
asapTest: function() {
|
asapTest: function() {
|
||||||
return isVideo || el.naturalHeight;
|
if (isVideo) {
|
||||||
|
return el.videoHeight || el.naturalHeight;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
noRemove: true,
|
noRemove: true,
|
||||||
cb: function() {
|
cb: function() {
|
||||||
|
|||||||
@ -7738,7 +7738,9 @@
|
|||||||
$.after(position, el);
|
$.after(position, el);
|
||||||
}
|
}
|
||||||
return $.asap((function() {
|
return $.asap((function() {
|
||||||
return isVideo || el.naturalHeight;
|
if (isVideo) {
|
||||||
|
return el.videoHeight || el.naturalHeight;
|
||||||
|
}
|
||||||
}), function() {
|
}), function() {
|
||||||
return ImageExpand.completeExpand(post);
|
return ImageExpand.completeExpand(post);
|
||||||
});
|
});
|
||||||
@ -7975,7 +7977,9 @@
|
|||||||
latestEvent: e,
|
latestEvent: e,
|
||||||
endEvents: 'mouseout click',
|
endEvents: 'mouseout click',
|
||||||
asapTest: function() {
|
asapTest: function() {
|
||||||
return isVideo || el.naturalHeight;
|
if (isVideo) {
|
||||||
|
return el.videoHeight || el.naturalHeight;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
noRemove: true,
|
noRemove: true,
|
||||||
cb: function() {
|
cb: function() {
|
||||||
|
|||||||
@ -117,7 +117,7 @@ ImageExpand =
|
|||||||
el.src = src or post.file.URL
|
el.src = src or post.file.URL
|
||||||
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
position = if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb
|
||||||
$.after position, el unless el is position.nextSibling
|
$.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
|
ImageExpand.completeExpand post
|
||||||
|
|
||||||
completeExpand: (post) ->
|
completeExpand: (post) ->
|
||||||
|
|||||||
@ -37,7 +37,7 @@ ImageHover =
|
|||||||
el: el
|
el: el
|
||||||
latestEvent: e
|
latestEvent: e
|
||||||
endEvents: 'mouseout click'
|
endEvents: 'mouseout click'
|
||||||
asapTest: -> (isVideo or el.naturalHeight)
|
asapTest: -> (if isVideo then el.videoHeight or el.naturalHeight)
|
||||||
noRemove: true
|
noRemove: true
|
||||||
cb: ->
|
cb: ->
|
||||||
if isVideo
|
if isVideo
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user