diff options
Diffstat (limited to 'themes/wind')
-rw-r--r-- | themes/wind/js/ui.init.js | 5 | ||||
-rw-r--r-- | themes/wind/views/photo.html.php | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index a4fc0e2f..7637ad80 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -93,6 +93,11 @@ $(document).ready(function() { $("#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() { + $(this).gallery_valign(); + }); } // Photo/Item item view diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index cb830e23..b42ab987 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -12,7 +12,7 @@ // After the image is rotated or replaced we have to reload the image dimensions // so that the full size view isn't distorted. - gallery_image_replaced_hook = function(data, thumb) { + $("#g-photo").bind("gallery.change", function() { $.ajax({ url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>", dataType: "json", @@ -20,7 +20,7 @@ full_dims = data.full; } }); - } + }); }); </script> <? endif ?> |