From 304dd9cb51b3514f2e663674d22f0d73c0f3e583 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 10 Sep 2010 23:13:47 -0700 Subject: After replacing thumbnails, resize all .g-item boxes down to just a bit larger than the image and then do equal_heights() on them. This tightens the grid back up again when appropriate after a rotation. --- themes/wind/js/ui.init.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'themes/wind/js/ui.init.js') diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index e5071dc1..2c67bf3a 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -97,7 +97,9 @@ $(document).ready(function() { // Realign any thumbnails that change so that when we rotate a thumb it stays centered. $(".g-item").bind("gallery.change", function() { - $(this).height($(this).find("img").height() + 2); + $(".g-item").each(function() { + $(this).height($(this).find("img").height() + 2); + }); $(".g-item").equal_heights().gallery_valign(); }); } -- cgit v1.2.3