Don't keep running waitExpand's asap func when the image error'd.
This commit is contained in:
parent
06e6f84867
commit
662cff6396
@ -677,6 +677,9 @@ a.hide-announcement {
|
|||||||
:root.gecko.fit-width .full-image {
|
:root.gecko.fit-width .full-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.fileThumb > .warning {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
#ihover {
|
#ihover {
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@ -119,7 +119,7 @@ ImageExpand =
|
|||||||
file = post.file.fullImage
|
file = post.file.fullImage
|
||||||
|
|
||||||
if post.file.isImage
|
if post.file.isImage
|
||||||
$.asap (-> file.naturalHeight), ->
|
$.asap (-> if post.file.isExpanding then file.naturalHeight else true), ->
|
||||||
ImageExpand.completeExpand post
|
ImageExpand.completeExpand post
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -135,10 +135,9 @@ ImageExpand =
|
|||||||
$.on file, 'loadeddata', complete
|
$.on file, 'loadeddata', complete
|
||||||
|
|
||||||
completeExpand: (post) ->
|
completeExpand: (post) ->
|
||||||
post.file.isReady = true
|
|
||||||
{thumb} = post.file
|
|
||||||
return unless post.file.isExpanding # contracted before the image loaded
|
return unless post.file.isExpanding # contracted before the image loaded
|
||||||
delete post.file.isExpanding
|
delete post.file.isExpanding
|
||||||
|
post.file.isReady = true
|
||||||
post.file.isExpanded = true
|
post.file.isExpanded = true
|
||||||
unless post.nodes.root.parentNode
|
unless post.nodes.root.parentNode
|
||||||
# Image might start/finish loading before the post is inserted.
|
# Image might start/finish loading before the post is inserted.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user