Skip to content

Commit

Permalink
Issue #17 Fixed
Browse files Browse the repository at this point in the history
* Adjusted allowances for width
  • Loading branch information
Jason Butz committed Jan 14, 2013
1 parent c2f048e commit 85ea1a3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions js/bootstrap-lightbox.js
Expand Up @@ -221,13 +221,19 @@
$img.css('max-height', 'none');


var sOffs = 40; // STYLE ?
if(that.$element.find('.lightbox-header').length > 0) sOffs += 10;
$img.css('max-width', $(window).width() - sOffs);
$img.css('max-height', $(window).height() - sOffs);
var wOffs = 50; // STYLE ?
var hOffs = 40; // STYLE ?
if(that.$element.find('.lightbox-header').length > 0)
{
wOffs += 40;
hOffs += 10;
}
$img.css('max-width', $(window).width() - wOffs);
$img.css('max-height', $(window).height() - hOffs);

that.w = $img.width();
that.h = $img.height();
console.log(that.w, that.h);
}

that.$element.css({
Expand Down

0 comments on commit 85ea1a3

Please sign in to comment.