image gallery sizing done

This commit is contained in:
Sanj 2011-12-14 02:57:45 +05:30
parent 07bea5d278
commit 5987e956a3

View File

@ -76,7 +76,13 @@ $('.thumbsDetails').live("click", function(e) {
$lbox.height(lightboxHeight); $lbox.height(lightboxHeight);
var viewportWidth = $(window).width(); var viewportWidth = $(window).width();
var viewportHeight = $(window).height(); var viewportHeight = $(window).height();
//FIXME: Add conditionals for if image bigger than viewport if (viewportHeight < lightboxHeight) {
$lbox.height(viewportHeight - 40);
}
var lightboxTop = parseInt((viewportHeight - $lbox.height()) / 2);
$lbox.css({'top': lightboxTop + "px"});
// showLightbox($img); // showLightbox($img);
var title = $(this).hasAttr("title") ? $(this).attr("title") : ''; var title = $(this).hasAttr("title") ? $(this).attr("title") : '';