From: Daniel Molina Date: Thu, 14 Aug 2014 14:57:25 +0000 (+0200) Subject: Set max normalized percentage value to 1 X-Git-Tag: v5.4~12^2~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5617%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Set max normalized percentage value to 1 If a value greater than the end value is set for the range slider, the handle and bar width should not be greater than the container --- diff --git a/js/foundation/foundation.slider.js b/js/foundation/foundation.slider.js index cbbd18fa2..b97fa6b9e 100755 --- a/js/foundation/foundation.slider.js +++ b/js/foundation/foundation.slider.js @@ -141,7 +141,7 @@ }, normalized_percentage : function(val, start, end) { - return (val - start)/(end - start); + return Math.min(1, (val - start)/(end - start)); }, normalized_value : function(val, start, end, step) {