summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/wind/views/photo.html.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php
index f8b5511c..cb830e23 100644
--- a/themes/wind/views/photo.html.php
+++ b/themes/wind/views/photo.html.php
@@ -4,10 +4,23 @@
<!-- Use javascript to show the full size as an overlay on the current page -->
<script type="text/javascript">
$(document).ready(function() {
+ full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
$(".g-fullsize-link").click(function() {
- $.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>");
+ $.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
return false;
});
+
+ // 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) {
+ $.ajax({
+ url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>",
+ dataType: "json",
+ success: function(data, textStatus) {
+ full_dims = data.full;
+ }
+ });
+ }
});
</script>
<? endif ?>