diff --git a/src/definitions/modules/slider.js b/src/definitions/modules/slider.js index 1575300939..1a600518d9 100644 --- a/src/definitions/modules/slider.js +++ b/src/definitions/modules/slider.js @@ -205,28 +205,26 @@ $.fn.slider = function(parameters) { }); }, autoLabel: function() { - if(module.get.step() != 0) { - $labels = $module.find('.labels'); - if($labels.length != 0) { - $labels.empty(); - } - else { - $labels = $module.append('').find('.labels'); - } - for(var i = 0, len = module.get.numLabels(); i <= len; i++) { - var - labelText = module.get.label(i), - $label = (labelText !== "") - ? !(i % module.get.gapRatio()) - ? $('
  • ' + labelText + '
  • ') - : $('
  • ') - : null, - ratio = i / len - ; - if($label) { - module.update.labelPosition(ratio, $label); - $labels.append($label); - } + $labels = $module.find('.labels'); + if($labels.length != 0) { + $labels.empty(); + } + else { + $labels = $module.append('').find('.labels'); + } + for(var i = 0, len = module.get.numLabels(); i <= len; i++) { + var + labelText = module.get.label(i), + $label = (labelText !== "") + ? !(i % module.get.gapRatio()) + ? $('
  • ' + labelText + '
  • ') + : $('
  • ') + : null, + ratio = i / len + ; + if($label) { + module.update.labelPosition(ratio, $label); + $labels.append($label); } } } @@ -591,7 +589,7 @@ $.fn.slider = function(parameters) { switch (settings.labelType) { case settings.labelTypes.number: - return Math.round(((value * module.get.step()) + module.get.min()) * precision ) / precision; + return Math.round(((value * (module.get.step() === 0 ? 1 : module.get.step())) + module.get.min()) * precision ) / precision; case settings.labelTypes.letter: return alphabet[(value) % 26]; default: