summaryrefslogtreecommitdiff
path: root/themes/wind/js/ui.init.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-09-12 10:57:41 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-09-12 10:57:41 -0700
commitbd532f6c88ef54bd47c9b1af46bc8d2c80d4407b (patch)
tree7522d38320d6466ac400a97ace5ba3b2d37048fd /themes/wind/js/ui.init.js
parentac64614d4da7174c085f257f3b8e39aa7afa9eb5 (diff)
parentf84c4a6192ea0e47ca5b2006baa0bfd7e09a682c (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'themes/wind/js/ui.init.js')
-rw-r--r--themes/wind/js/ui.init.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js
index a4fc0e2f..2c67bf3a 100644
--- a/themes/wind/js/ui.init.js
+++ b/themes/wind/js/ui.init.js
@@ -90,9 +90,18 @@ $(document).ready(function() {
$(this).css("top", 0).css("left", 0);
// Remove the placeholder and hover class from the item
$(this).removeClass("g-hover-item");
+ $(this).gallery_valign();
$("#g-place-holder").remove();
}
);
+
+ // Realign any thumbnails that change so that when we rotate a thumb it stays centered.
+ $(".g-item").bind("gallery.change", function() {
+ $(".g-item").each(function() {
+ $(this).height($(this).find("img").height() + 2);
+ });
+ $(".g-item").equal_heights().gallery_valign();
+ });
}
// Photo/Item item view