From f701f11a521e16c4829b834b805b2faef9785abd Mon Sep 17 00:00:00 2001 From: nachor4 Date: Wed, 9 Oct 2013 23:06:52 -0300 Subject: [PATCH 1/2] new configuration in core.js - Minimum Size Two configurations added: min_width and min_height. Both are set in 0 which be equivalent to disable the functionality. If they are changed, the slider will shrink up to the min width or min height. --- src/core.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core.js b/src/core.js index e78337f..8e61c01 100644 --- a/src/core.js +++ b/src/core.js @@ -11,6 +11,8 @@ Superslides = function(el, options) { pagination: true, hashchange: false, scrollable: true, + min_width:0, + min_height:0, elements: { preserve: '.preserve', nav: '.slides-navigation', From d8222694875acc9af33db30f7aeca7b5356ba2c4 Mon Sep 17 00:00:00 2001 From: nachor4 Date: Wed, 9 Oct 2013 23:15:55 -0300 Subject: [PATCH 2/2] OnReseze - Minimum Size Sometimes a minimum width and/or height is required. If the properties min_width and min_height are set when the window resizes it will compare the new width and/or height with the minimum values set and calculate the maximum to avoid overshrink the slider. --- src/setup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/setup.js b/src/setup.js index 8a14339..00d3b85 100644 --- a/src/setup.js +++ b/src/setup.js @@ -30,8 +30,8 @@ setTimeout(function() { var $children = that.$container.children(); - that.width = that._findWidth(); - that.height = that._findHeight(); + that.width = Math.max(that.options.min_width, that._findWidth()); + that.height = Math.max(that.options.min_height, that._findHeight()); $children.css({ width: that.width,