diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gallery.common.js | 4 | ||||
-rw-r--r-- | lib/gallery.show_full_size.js | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 81904548..6e3efe5a 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -116,7 +116,7 @@ var in_progress = 0; $(".gContextMenu *").removeAttr('title'); $(".gContextMenu ul").hide(); - $(".gContextMenu").hover( + $(".gContextMenu li").hover( function() { if (in_progress == 0) { $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); @@ -125,7 +125,7 @@ } }, function() { - $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); + $(this).find(".gContext").slideUp("slow", function() { in_progress = 0; }); } ); } diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 7e826c32..360ecdc2 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -15,7 +15,16 @@ '-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; ' + '-moz-background-inline-policy: -moz-initial; z-index: 1001;"> </div>'); - var image_size = $.gallery_auto_fit_window(image_width, image_height); + var image_size; + if (image_width >= size.width() - 6 || image_height >= size.height() - 6) { + image_size = $.gallery_auto_fit_window(image_width, image_height); + } else { + image_size = { + top: Number((height - image_height) / 2), left: Number((width - image_width) / 2), + width: Number(image_width), height: Number(image_height) + }; + } + $("body").append('<div id="gFullsize" class="ui-dialog ui-widget" ' + 'style="overflow: hidden; display: block; ' + |