From 85ea1a34e1d0277f5bc118bb3051d125c6165496 Mon Sep 17 00:00:00 2001 From: Jason Butz Date: Mon, 14 Jan 2013 14:58:57 -0600 Subject: [PATCH] Issue #17 Fixed * Adjusted allowances for width --- js/bootstrap-lightbox.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/bootstrap-lightbox.js b/js/bootstrap-lightbox.js index c13687c..9da1a08 100644 --- a/js/bootstrap-lightbox.js +++ b/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({