summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/lightbox.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index 628d8f8..55b6d18 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -25,6 +25,7 @@ var Lightbox = {
resizeSpeed: 'normal', // Controls the speed of the lightbox resizing animation.
fadeInSpeed: 'normal', // Controls the speed of the image and overlay appearance.
slideDownSpeed: 'slow', // Controls the speed of the image details appearance.
+ minWidth: 240,
borderSize : 10,
boxColor : 'fff',
fontColor : '000',
@@ -482,6 +483,8 @@ var Lightbox = {
// resizeContainer()
resizeContainer: function(imgWidth, imgHeight) {
+ imgWidth = (imgWidth < Lightbox.minWidth ? Lightbox.minWidth : imgWidth);
+
this.widthCurrent = $('#outerImageContainer').width();
this.heightCurrent = $('#outerImageContainer').height();