From facb351552dd4ff80b19c82d30bc91a23b7edd89 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 11 Oct 2017 14:40:10 -0700 Subject: [PATCH] fixes #3331 --- app/assets/javascripts/posts.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index 179ab6df1..88c01aeea 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -368,7 +368,21 @@ if ($("#image-resize-notice").is(":visible")) { $("#image-resize-link").click(); } else { - Danbooru.Post.expand_image(e); + var $image = $("#image"); + var $notice = $("#image-resize-notice"); + $image.attr("src", $("#image-container").data("large-file-url")); + $image.css("opacity", "0.25"); + $image.width($image.data("large-width")); + $image.height($image.data("large-height")); + $notice.children().eq(0).show(); + $notice.children().eq(1).hide(); // Loading message + $image.on("load", function() { + $image.css("opacity", "1"); + $notice.show(); + }); + Danbooru.Note.Box.scale_all(); + $image.data("scale-factor", 1); + e.preventDefault(); } }); }