Permalink
Browse files

Issue #17 Fixed

* Adjusted allowances for width
  • Loading branch information...
1 parent c2f048e commit 85ea1a34e1d0277f5bc118bb3051d125c6165496 Jason Butz committed Jan 14, 2013
Showing with 10 additions and 4 deletions.
  1. +10 −4 js/bootstrap-lightbox.js
View
14 js/bootstrap-lightbox.js
@@ -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({

0 comments on commit 85ea1a3

Please sign in to comment.