From 662cff6396addcba8bb95898543f8c626973347e Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 9 Apr 2014 10:20:32 +0200 Subject: [PATCH] Don't keep running waitExpand's asap func when the image error'd. --- css/style.css | 3 +++ src/Images/ImageExpand.coffee | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/css/style.css b/css/style.css index 11857b167..323abf62f 100644 --- a/css/style.css +++ b/css/style.css @@ -677,6 +677,9 @@ a.hide-announcement { :root.gecko.fit-width .full-image { width: 100%; } +.fileThumb > .warning { + clear: both; +} #ihover { -moz-box-sizing: border-box; box-sizing: border-box; diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index d7d00c0cc..91136d9c4 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -119,7 +119,7 @@ ImageExpand = file = post.file.fullImage if post.file.isImage - $.asap (-> file.naturalHeight), -> + $.asap (-> if post.file.isExpanding then file.naturalHeight else true), -> ImageExpand.completeExpand post return @@ -135,10 +135,9 @@ ImageExpand = $.on file, 'loadeddata', complete completeExpand: (post) -> - post.file.isReady = true - {thumb} = post.file return unless post.file.isExpanding # contracted before the image loaded delete post.file.isExpanding + post.file.isReady = true post.file.isExpanded = true unless post.nodes.root.parentNode # Image might start/finish loading before the post is inserted.